Page MenuHomePhabricator

Use WAI-ARIA landmark roles to improve accessibility
Closed, ResolvedPublic

Description

Author: peter.krantz

Description:
WAI-ARIA landmark roles for Monobook skin

The W3C WAI-ARIA specification defines a set of specialised "landmark"
roles. These roles provide a method to programmatically identify commonly found
sections of web page content in a consistent way. This allows assistive
technologies (e.g. a screen reader) to provide users with features which they
can use to identify and navigate to sections of page content.

Landmark roles are specified with the role attribute in HTML. In order to keep
the template markup valid (when testing with the W3C markup validation service)
this patch adds landmark role data with a small javascript after the page has
loaded.

For more information on WAI-ARIA landmark roles see:

Using WAI ARIA landmark roles by Steve Faulkner:
http://www.paciellogroup.com/blog/?p=106

and the WAI-ARIA specification.
http://www.w3.org/WAI/PF/aria/

Regards,

Peter Krantz


Version: unspecified
Severity: enhancement
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=24659

attachment monobook_wai-aria_landmark_roles.diff ignored as obsolete

Details

Reference
bz18338

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 10:35 PM
bzimport set Reference to bz18338.
bzimport added a subscriber: Unknown Object (MLST).

Please provide this for all skins. We do not want the functionality of the skins to deviate.

daniel added a comment.Aug 4 2010, 8:45 AM

bug 24659 asks for WAI ARIA stuff to be allowed in wiki text. That may help with allowing it for skins, too.

jp.posma wrote:

WAI-ARIA landmark roles

In fact these landmark roles can be used for all skins. Included them in mediawiki.utils.js.

Apply to trunk/phase3.

Attached:

Any reason we're not hardcoding them? Afaik, a few screen readers ignore Javascript

peter.krantz wrote:

(In reply to comment #4)

Any reason we're not hardcoding them? Afaik, a few screen readers ignore
Javascript

Screenreders do not ignore javascript, but it is better to code them straight into the HTML. Only problem is with sensitive people who favor validation above accessibility therefore the javascript.

But real attributes in markup is a better option.

brion added a comment.Jun 1 2011, 7:56 PM

Doing this straight in the HTML would indeed be better, though the JS should usually work.

We should however actually research *AND TEST* this with actual screen readers.

ayg wrote:

We should definitely add this to the HTML output, not just via JS. The role attribute is valid in HTML5. I'd also say we should test this with actual screen readers before adding the roles, though, to make sure we understand what effect they're having.

sumanah wrote:

Jan Paul, do you have time to revise the patch to integrate the review and suggestions here?

Tpt added a comment.Oct 12 2012, 4:41 PM

I've created a change that add these role directly in skins:
https://gerrit.wikimedia.org/r/#/c/27734/

It's not valid in XHTML 1.0 but jQuery UI already use it without any problem.

(In reply to comment #9)

I've created a change that add these role directly in skins:
https://gerrit.wikimedia.org/r/#/c/27734/

Status Merged

Potential regression of this commit: see bug 42394.
Thomaspt: Could you take a look?

As of T44394: After introduction of WAI ARIA roles, VoiceOver is extremely slow task description change by @MattFitzpatrick today, possible connection change introduced by current task.