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

Fix reporting of landmarks, implement reporting of groupings and figures #10462

Merged
merged 35 commits into from
Nov 18, 2019

Conversation

LeonarddeR
Copy link
Collaborator

@LeonarddeR LeonarddeR commented Nov 4, 2019

Link to issue number:

Supersedes #10444
Supersedes #10425
Fixes #10095
Fixes #10083
Fixes #9485
fixes #9177
Fixes #5326

Landmarks

Summary of the issue:

The following issues arose after merging #10110

  1. In braille, the landmark type was no longer shown.
  2. In braille, when at the start of the line, the braille cursor was positioned at the landmark role text and not at the actual start of the content. This was caused by landmarks being treated as markers, not as containers
  3. The landmark role was announced for regions
  4. Some random bugs in landmark reporting in Internet Explorer.
  5. Regions without names were reported sometimes

Description of how this pull request fixes the issue:

  1. Introduced ROLE_REGION, us that role instead of ROLE_LANDMARK. Only mark regions as content if they have a name, otherwise don't announce them
  2. Landmarks and regions now have presentation type container. In the braille module, an exception is made not to show the end of landmarks, as in speech. There is currently some debate on whether this is appropriate, see Entering and exiting landmarks #10420
  3. No exceptions are made in speech.getControlFieldSpeech to report names of landmarks any more. Instead, we make sure that landmark fields have alwaysReportName set on them.
  4. Improved edge landmark detection code to try to detect the landmark for some html5 elements, particularly the element

Groupings

Summary of the issue:

Aria role grouping is not conveyed by NVDA. This also applies to other grouping types, like fieldsets and figures.

Description of how this pull request fixes the issue:

Added the ability to report groupingsin browse mode. It can be disabled using the document formatting category of NVDA's settings. Groupings are only reported when they have a label, legend or caption.

General changes

The end of articles is no longer reported, similar to landmarks, regions and now also groupings. End of figures is reported.

Testing performed:

Tested the following test case:
Landmarks and groupings test case.htm.txt

Tested in Firefox, Chrome, Internet Explorer and edge classic

Known issues with pull request:

There are several issues in Edge Classic which we can't work around:

  • Elements like header, figure and section don't convey an aria role. They are considered groupings and treated as such
  • The legend in a fieldset isn't set as name on the fieldset, therefore it is treated as a grouping without a label
  • There is no mapping for figcaption, it therefore isn't reported as caption.

I think we should ignored these issues for now and revaluate this text case when Edge Chromium UIA support is implemented (#10402)

There is also an issue in Internet Explorer. The legend of a fieldset isn't set to the IAccessible name of the fieldset.

Change log entry:

New features
Please update the entry about articles as follows:

Changes

@LeonarddeR
Copy link
Collaborator Author

I still need to do some quick tests with braille tomorrow before this is ready.

@AppVeyorBot

This comment has been minimized.

@AppVeyorBot

This comment has been minimized.

@LeonarddeR
Copy link
Collaborator Author

@michaelDCurran I'm sorry that this has become pretty big. I'm still convinced that integrating this all into one pr was a good decision.

@michaelDCurran
Copy link
Member

It seems in Firefox / Chrome, the fieldset containing a legend in your testcase only says grouping (no label is announced) when entering it. Is this expected? The rest of the tests seem to correctly do what they state.

Copy link
Member

@michaelDCurran michaelDCurran left a comment

Choose a reason for hiding this comment

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

Code is okay. But, see comment re one testcase possibly not working as expected. Plus, I'm not convinced that article and grouping should have their end suppressed like landmark. I'm also not convinced about region either, but I do understand that this already may have been expected behaviour as regions were somewhat tied to landmarks.

@LeonarddeR
Copy link
Collaborator Author

It seems in Firefox / Chrome, the fieldset containing a legend in your testcase only says grouping (no label is announced) when entering it. Is this expected?

Yes, this is expected. This is because the name of the grouping (the legend) is also part of the content, and therefore it is suppressed.

Plus, I'm not convinced that article and grouping should have their end suppressed like landmark.

I did this because I'd imagine there are cases where articles are directly followed by other articles. Idem for groupings. I'm happy to revert this if you so desire.

I'm also not convinced about region either, but I do understand that this already may have been expected behaviour as regions were somewhat tied to landmarks.

Correct, though I agree that regions are much more explicit and therefore deserve an exit announcement.

How about if I limit the suppressing of "out of" anouncements to landmarks only? We can always readd groups and articles if it is suggested as such and people have good reasoning.

@michaelDCurran
Copy link
Member

michaelDCurran commented Nov 18, 2019 via email

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