Skip to content

Report label of lists in browseMode#8568

Merged
michaelDCurran merged 5 commits intomasterfrom
i7652
Aug 1, 2018
Merged

Report label of lists in browseMode#8568
michaelDCurran merged 5 commits intomasterfrom
i7652

Conversation

@michaelDCurran
Copy link
Copy Markdown
Member

Link to issue number:

Fixes #7652

Summary of the issue:

Web authors can label ul/ol lists with aria-label or aria-labelledby. However, NVDA does not currently speak these labels when entering the list with quicknav, or arrowing (when the label does not appear anywhere else on the page).

Description of how this pull request fixes the issue:

The information spoken when entering a list has now been generlized so that it includes all the standard properties such as name, states, level etc, which were previously being completely ignored.

Testing performed:

Using Firefox, Tested the testcase in #7652. NVDA announced the name of both lists.

Known issues with pull request:

None.

Change log entry:

Bug fixes:

  • When navigating into a list on the web, NvDA will now report its label if the web author has provided one.

…tering a list (including: name, level, states etc), not just item count.
# General cases
elif (
# General cases.
if (
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The conditions for these blocks are complicated, can you explain why this elif must become an if?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

In the past, all of the above if/elifs returned. Now one of them (the
lists one) does not return and needs to get to this point.

Oh I missed the removal of the return.

Perhaps I could move the if for the lists down to inside this general if
and switch it back to being an elif. Might that make the flow more
understandable?

No, I think leave it as is. It's the conditions themselves that make this hard to understand. It's hard to know which components of the conditions are exclusive and not.

@michaelDCurran
Copy link
Copy Markdown
Member Author

michaelDCurran commented Jul 30, 2018 via email

source/speech.py Outdated

# Determine what text to speak.
# Special cases
if speakEntry and childControlCount and fieldType=="start_addedToControlFieldStack" and role==controlTypes.ROLE_LIST and controlTypes.STATE_READONLY in states:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is it still important to have speakEntry here? It is checked before this value containerContainsText is used in the "General" section.

@michaelDCurran
Copy link
Copy Markdown
Member Author

michaelDCurran commented Jul 30, 2018 via email

@michaelDCurran
Copy link
Copy Markdown
Member Author

@feerrenrut: I removed the check of the speakEntry variable. Does this look okay now?

# General cases.
if (
(speakEntry and ((speakContentFirst and fieldType in ("end_relative","end_inControlFieldStack")) or (not speakContentFirst and fieldType in ("start_addedToControlFieldStack","start_relative"))))
or (speakWithinForLine and not speakContentFirst and not extraDetail and fieldType=="start_inControlFieldStack")
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

It may not be worth doing, but the a & not b & not c part here can be simplified to a & not (b or c)

feerrenrut
feerrenrut previously approved these changes Aug 1, 2018
- In the list of languages in NVDA's General Settings, language name for Burmese is displayed correctly on Windows 7. (#8544)
- In Microsoft Edge, NVDA will announce notifications such as reading view availability and page load progress. (#8423)
- Similar to other multiline text fields, When positioned at the start of a document in Braille, the display is now panned such that the first character of the document is at the start of the display. (#8406)
- When navigating into a list on the web, NvDA will now report its label if the web author has provided one. (#7652)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just noticed the 'v' in NVDA is lowercase. I'll fix this.

Copy link
Copy Markdown
Contributor

@feerrenrut feerrenrut left a comment

Choose a reason for hiding this comment

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

Assuming the build passes, this is ready to merge.

@michaelDCurran michaelDCurran merged commit caa97fb into master Aug 1, 2018
@nvaccessAuto nvaccessAuto added this to the 2018.3 milestone Aug 1, 2018
@feerrenrut feerrenrut deleted the i7652 branch January 17, 2020 08:59
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.

NVDA not announcing aria-label on lists

4 participants