Skip to content

Add support for aria-brailleroledescription from ARIA 1.3.#14748

Merged
seanbudd merged 4 commits into
masterfrom
ariaBrailleRoleDescription
Mar 30, 2023
Merged

Add support for aria-brailleroledescription from ARIA 1.3.#14748
seanbudd merged 4 commits into
masterfrom
ariaBrailleRoleDescription

Conversation

@michaelDCurran

Copy link
Copy Markdown
Member

Link to issue number:

partial fix for #11829

Summary of the issue:

ARIA 1.3 adds a aria-brailleroledescription attribute, which allows the web author to specify a string representation for an element's role, specific to Braille.
For example:

<button aria-roledescription="planet" aria-brailleroledescription="plnt">Saturn</button>

A button whos spoken role description will be "planet" but in Braille it will be shown as the abreviated "plnt".

Description of user facing changes

NVDA will honor the aria-brailleroledescription attribute if set by the web author, when presenting web content on a braille display.

Description of development approach

The internal work to support custom braille role text had already been added to NVDAObjects and controlFields to allow for Braille abbreviations for landmarks. this PR:

  • Implements roleTextBraille on the IA2Web NVDAObject, exposing the content of the brailleroledescription IAccessible2 attribute if available
  • In the Gecko ia2 virtualBuffer, normalizes the brailleroledescription IAccessible2 attribute to the roleTextBraille NvDA attribute on controlFields.

Testing strategy:

Given the test uri:

data:text/html,<p>Big <button aria-roledescription="planet" aria-brailleroledescription="plnt">Saturn</button></p>

In Firefox, Chrome and Edge:

  • Ensured that reading by line in browse mode spoke "Big planet Saturn" and Brailled "Big plnt Saturn".
  • Ensured that tabbing to the button in focus mode spoke "Saturn planet" and Brailled "Saturn plnt".
  • Also adding contenteditable="true" to the paragraph, ensured that the above actions still caused Braille to show "plnt" and not "planet".

Known issues with pull request:

None known.

Change log entries:

New features

  • Added support for the aria-brailleroledescription ARIA 1.3 attribute allowing web authors to override the type of an element shown on the Braille display.
    Changes
    Bug fixes
    For Developers

Code Review Checklist:

  • Pull Request description:
    • description is up to date
    • change log entries
  • Testing:
    • Unit tests
    • System (end to end) tests
    • Manual testing
  • API is compatible with existing add-ons.
  • Documentation:
    • User Documentation
    • Developer / Technical Documentation
    • Context sensitive help for GUI changes
  • UX of all users considered:
    • Speech
    • Braille
    • Low Vision
    • Different web browsers
    • Localization in other languages / culture than English
  • Security precautions taken.

@michaelDCurran michaelDCurran requested a review from a team as a code owner March 27, 2023 07:13
@michaelDCurran michaelDCurran requested a review from seanbudd March 27, 2023 07:13
@AppVeyorBot

Copy link
Copy Markdown

See test results for failed build of commit 66585c8df0

Comment thread source/virtualBuffers/gecko_ia2.py Outdated
@AppVeyorBot

Copy link
Copy Markdown

See test results for failed build of commit 97808891f7

@seanbudd seanbudd merged commit 51aacac into master Mar 30, 2023
@seanbudd seanbudd deleted the ariaBrailleRoleDescription branch March 30, 2023 05:51
@nvaccessAuto nvaccessAuto added this to the 2023.2 milestone Mar 30, 2023
@pkra pkra mentioned this pull request Apr 28, 2023
@pkra

pkra commented Apr 28, 2023

Copy link
Copy Markdown

Thank you very much, @michaelDCurran!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants