Re: Handling of landmark roles on native markup

On Fri, Mar 16, 2012 at 6:24 PM, Aaron Leventhal - Code
<aaronlevbugs@gmail.com> wrote:
> I recently discovered that Firefox and WebKit-based browsers handle
> landmarks differently.
>
> WebKit implements the current ARIA implementation guide at
> http://www.w3.org/TR/wai-aria-implementation/#mapping_role --
> "For the standard role mechanism of the accessibility API, the user
> agent MUST use the first token in the sequence of tokens in the
> role attribute value which matches, on comparison, the name of any
> non-abstract WAI-ARIA role."
>
> Firefox/Gecko implements an older version of the implementation guide
> at  http://www.w3.org/TR/2009/WD-wai-aria-implementation-20090224/#mapping_role
> "The first role token with a known mapping to accessibility APIs SHOULD be
> used when mapping to the accessibility API via the standard role mechanism
> of the accessibility API. Use the role table below and apply any special
> case rules that are specified."
>
> As I see it, there are two advantages to the older system:
> 1. The landmark role can complement native semantics without clobbering
> them, e.g.
>  <input type="text" role="search">
>  <table role="complementary">
>  <ul role="navigation">

I suspect a model where @role always clobbers native semantics is
easier for authors to understand.

If we wanted a landmark designation feature that worked differently,
we'd have been better off minting a new attribute like @landmark.

> 2. It enables forward compatibility of ARIA-enabled content with future
> browsers and platforms, as fallback roles can be used. For example, <table
> role="calendar grid"> allows newer platforms who understand a "calendar"
> role to map directly to that, but previous versions which did not know about
> "calendar", would fall back on "grid", still a valid, usable role.

I think the new spec is intended to require this behavior too.

ARIA normatively requires of host languages that:

"The first name literal of a non-abstract WAI-ARIA role in the list of
tokens in the role attribute defines the role according to which the
user agent MUST process the element."

http://www.w3.org/WAI/PF/aria/host_languages#host_general_role

ARIA (albeit informatively and circularly) defines a "WAI-ARIA role"
as "a role is set on an element using a role attribute":

http://www.w3.org/WAI/PF/aria/usage#usage_intro

Perhaps it would make things clearer if the implementation guide replaced:

"For the standard role mechanism of the accessibility API, the user
agent MUST use the first token in the sequence of tokens in the role
attribute value which matches, on comparison, the name of any
non-abstract WAI-ARIA role."

with something like:

"For the standard role mechanism of the accessibility API, the user
agent MUST use the first token in the sequence of tokens in the role
attribute value which is the same as the name of a role for which it
implements a mapping to the platform accessibility APIs."

"User agents must not map abstract roles to platform accessibility APIs."



--
Benjamin Hawkes-Lewis

Received on Monday, 19 March 2012 11:54:17 UTC