Closed Bug 1778795 Opened 2 years ago Closed 7 months ago

Conditional role mapping of role=form element based on accessible name (WPT wai-aria/role/form-roles.html form without label)

Categories

(Core :: Disability Access APIs, enhancement)

Firefox 101
enhancement

Tracking

()

RESOLVED FIXED
125 Branch
Tracking Status
firefox125 --- fixed

People

(Reporter: spectranaut, Assigned: nlapre)

References

(Blocks 3 open bugs)

Details

Attachments

(1 file)

Steps to reproduce:

In OSX, open an html file that includes an unnamed form element in Firefox, such as:

<div role="form">Form contents.</div>

Use the accessibility inspect tools to see the AXSubrole of the role=form element.

Actual results:

The element has a landmark AXSubrole

Expected results:

The element should have no AXSubrole

See the relevant changes in CORE-AAM here: https://github.com/w3c/core-aam/pull/97

I only describe the bug for the OSX CORE-AAM mappings, but the others will have to be updated as well!

As a side note, Firefox already behaves like this for <form> without a name precisely to avoid the landmark cluttering described in https://github.com/w3c/core-aam/issues/11#issue-325089950, but we currently treat role="form" differently. I'm curious as to why this change is necessary for role="form", given that the problematic examples all covered issues with <form>, not role="form". Is it just consistency?

Blocks: aria
Status: UNCONFIRMED → NEW
Type: defect → enhancement
Ever confirmed: true
OS: Unspecified → All
Hardware: Unspecified → All

See also the discussion in https://github.com/w3c/core-aam/issues/100

Blocks: a11y-wpt
Summary: Conditional role mapping of role=form element based on accessible name → Conditional role mapping of role=form element based on accessible name (WPT wai-aria/role/form-roles.html form without label)

The ARIA spec requires that, for certain landmark roles with no author-specified
names, user agents must treat such elements as if no role had been provided.
This revision accomplishes that task by carving out an exception in
ARIATransformRole and ComputeARIARole for roles::FORM, similar to the existing
carveout for roles::REGION. This revision also implements a NameIsEmpty function
which is helpful for checking name emptiness (since we do this in a few places)
without leaving a "name" variable on the stack. Finally, this revision updates a
expected WPT failure (by removing it).

Assignee: nobody → nlapre
Status: NEW → ASSIGNED
Pushed by nlapre@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b592c7990879 role="form" with empty accessible name returns native role, r=Jamie
Status: ASSIGNED → RESOLVED
Closed: 7 months ago
Resolution: --- → FIXED
Target Milestone: --- → 125 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: