Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Report ARIA details role #13649

Merged
merged 34 commits into from
Jun 29, 2022
Merged

Report ARIA details role #13649

merged 34 commits into from
Jun 29, 2022

Conversation

seanbudd
Copy link
Member

@seanbudd seanbudd commented Apr 28, 2022

Link to issue number:

None

Summary of the issue:

When announcing if an object has details, more information can be provided about the role of the details.
For example, if a comment is tied to a word, "has comment" should be reported instead of "has details".

Description of how this pull request fixes the issue:

Collects the details role.

The attribute details role is determined in a number of cases.

Braille

Use has cmmt to report presence of comment role aria-details target. Discussion

Focus Mode

detailsRole is normalized on the NVDAObject level to a controlType.Role.

Chromium

The IA2 attribute details-roles is used to get the role.

This supports the following roles (code): comment, definition, doc-endnote, doc-footnote. Other roles are given a value of * .

Currently only chromium supports details-roles.
Additionally, doc-endnote and definition are not supported IA2 attributes, and are not supported in NVDA widely.

We limit reporting for all cases by only reporting the fully supported details-roles: doc-footnote, comment

Other roles are reported as "has details".

FireFox

The related details node is fetched using in process injection, and the IAccessible information is retrieved.
The role is determined from the IAccessible role of the related node.

This is slower and provides a wider reporting of roles.

Browse Mode

The detailsRole attribute is added directly to the buffer, either as a descriptive role string or a role integer as a string.

Testing strategy:

The system test cases test the details role for Chrome, using both focus and browse mode.

runsystemtests.bat -t "*aria details*"

Equivalent manual testing was performed using those test cases on both Chrome and FireFox.

Known issues with pull request:

Braille tests will not work as expected as braille only reports details in marked content. #13815

Change log entries:

New features

- Instead of reporting "has details" the purpose of details is included where possible, for example "has comment".

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

@seanbudd seanbudd requested a review from a team as a code owner April 28, 2022 04:52
source/braille.py Outdated Show resolved Hide resolved
@seanbudd seanbudd marked this pull request as draft April 28, 2022 05:57
@AppVeyorBot

This comment was marked as outdated.

@AppVeyorBot

This comment was marked as outdated.

@seanbudd seanbudd marked this pull request as ready for review May 17, 2022 01:15
@AppVeyorBot

This comment was marked as outdated.

@AppVeyorBot

This comment was marked as off-topic.

source/aria.py Outdated Show resolved Hide resolved
source/aria.py Outdated Show resolved Hide resolved
source/aria.py Outdated Show resolved Hide resolved
source/braille.py Outdated Show resolved Hide resolved
tests/system/robot/chromeTests.py Outdated Show resolved Hide resolved
nvdaHelper/vbufBackends/gecko_ia2/gecko_ia2.cpp Outdated Show resolved Hide resolved
nvdaHelper/vbufBackends/gecko_ia2/gecko_ia2.h Outdated Show resolved Hide resolved
nvdaHelper/vbufBase/storage.cpp Outdated Show resolved Hide resolved
nvdaHelper/vbufBase/storage.cpp Outdated Show resolved Hide resolved
nvdaHelper/vbufBase/storage.h Outdated Show resolved Hide resolved
@seanbudd seanbudd marked this pull request as draft May 19, 2022 01:38
tests/system/robot/chromeTests.py Outdated Show resolved Hide resolved
tests/system/robot/chromeTests.py Show resolved Hide resolved
nvdaHelper/vbufBackends/gecko_ia2/gecko_ia2.cpp Outdated Show resolved Hide resolved
nvdaHelper/vbufBackends/gecko_ia2/gecko_ia2.cpp Outdated Show resolved Hide resolved
source/NVDAObjects/IAccessible/mozilla.py Show resolved Hide resolved
nvdaHelper/vbufBase/storage.cpp Outdated Show resolved Hide resolved
source/NVDAObjects/IAccessible/mozilla.py Outdated Show resolved Hide resolved
source/controlTypes/role.py Outdated Show resolved Hide resolved
@seanbudd seanbudd requested a review from feerrenrut June 20, 2022 02:02
@seanbudd seanbudd added the merge-early Merge Early in a developer cycle label Jun 28, 2022
@seanbudd seanbudd requested a review from feerrenrut June 29, 2022 01:09
@AppVeyorBot

This comment was marked as off-topic.

Comment on lines 161 to 165
<div id="definition-details-as-role" role="definition">details with role definition</div>
<p>
<span role="term">definition</span>:
<span id="definition-details-as-role" role="definition">details with role definition</span>
</p>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These shouldn't both exist (two elements with id="definition-details-as-role".
I'd also like the <dfn> example added. It seems both the role="term" / role="definition" case and the <p> A description for a <dfn>term</dfn> is in this paragraph.</p> case share the similar problem about aria-details pointing to the term rather than the definition. Illustrating this in the tests will be helpful when having the discussion later.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added documentation to the test samples and fixed it so we consistently point to the term in cfb74bf

source/braille.py Outdated Show resolved Hide resolved
@seanbudd seanbudd requested a review from feerrenrut June 29, 2022 04:25
@AppVeyorBot
Copy link

See test results for failed build of commit 3437f37dd8

@AppVeyorBot
Copy link

See test results for failed build of commit 99636e1cf6

@feerrenrut
Copy link
Contributor

Although the test failures look related to this change, similar tests have failed on other recent PR builds. I have started the build again.

@AppVeyorBot

This comment was marked as outdated.

@seanbudd seanbudd merged commit 2e7a5f0 into master Jun 29, 2022
@seanbudd seanbudd deleted the ariaDetailsRole branch June 29, 2022 23:35
@nvaccessAuto nvaccessAuto added this to the 2022.3 milestone Jun 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge-early Merge Early in a developer cycle
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants