Closed Bug 1357100 Opened 6 years ago Closed 4 years ago

Implement support for implicit value for aria-level on heading role


(Core :: Disability Access APIs, task, P3)




Tracking Status
firefox70 --- fixed


(Reporter: jdiggs, Assigned: gvelchuru, Mentored)


(Blocks 1 open bug)


(Whiteboard: [lang=c++])


(1 file)

In ARIA 1.1, the implicit value for aria-level on a heading is "2". See

Steps to reproduce:
1. Load data:text/html,<div role="heading">foo</div>
2. Use Accerciser to examine the element

Expected result: "level:2" would be found in the accessible object attributes.

Actual result: "level:2" is not found in the accessible object attributes.
This is something we should triage and fix but isn't among our most urgent bugs.(Contributions welcome as always!)
Priority: -- → P3
Mentor: jteh
Whiteboard: [lang=c++]

Thoughts on fixing this:

  1. The code should probably go here, just before we call GetDefaultLevel:
  2. We only want to do this if we're dealing with an ARIA role="heading". Get the ARIA role map entry and check if it's a heading. Example:
  3. If so, return the implicit value: 2.
  4. Add a test, similar to those for HTML headings (but based on the test in comment 0):
Type: defect → task

Currently taking a look at this!

I've uploaded a PR, im still unsure how exactly to test so some pointers would be fantastic

Flags: needinfo?(jteh)

Thanks for working on this! I'll add some comments to the patch, but here are some more precise steps to reproduce:

  1. Paste this URL into the address bar and press enter:
    data:text/html,<div role="heading">foo</div>
  2. Right click on "foo" and choose "Inspect Accessibility Properties".
  3. In the properties tree, expand the "attributes".
    • Expected: There should be a level: "2" attribute.
    • Actual: There is no level attribute.
Flags: needinfo?(jteh)

I made the changes, but somehow I am still not passing the test -- am I missing something?

Flags: needinfo?(jteh)

Ug. Turns out I was incorrect about where to place this code. Sorry. :( I'll comment on the patch.

Flags: needinfo?(jteh)
Assignee: nobody → gvelchuru
Pushed by
change implicit val for aria-level on a heading to 2 r=Jamie
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70
You need to log in before you can comment on or make changes to this bug.