Don't unconditionally report aria-current for all property changes.#10523
Merged
Conversation
michaelDCurran
approved these changes
Nov 20, 2019
|
PR introduces Flake8 errors 😲 See test results for Failed build of commit fcd86d6969 |
michaelDCurran
requested changes
Nov 20, 2019
michaelDCurran
left a comment
Member
There was a problem hiding this comment.
I was too quick. There are linting issues it seems.
1. Previously, speech.speakObjectProperties unconditionally forced reporting of aria-current, regardless of whether it was enabled in the allowedProperties argument.
This meant it was reported for all property changes, including name and state changes.
aria-current also wasn't checking the cache for property changes, so we couldn't determine whether it had changed or not, resulting in double reporting in some cases.
This has been fixed and speakObject enables this so it's still reported on focus, query, etc.
2. Now that aria-current is no longer unconditionally reported, the call from event_IA2AttributeChange to event_stateChange no longer reports aria-current.
This wasn't appropriate anyway.
Now, Ia2Web.event_IA2AttributeChange explicitly requests that aria-current changes be spoken.
5bd4b66 to
79c97a3
Compare
michaelDCurran
approved these changes
Nov 21, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Link to issue number:
Fixes #8960.
Summary of the issue:
aria-current changes are spoken multiple times. In addition, other property changes, such as a name change, incorrectly spoke aria-current.
Description of how this pull request fixes the issue:
Testing performed:
Test case:
data:text/html,<button onclick="this.setAttribute('aria-current', 'page');">Make current</button><hr><button aria-current="page" onClick="this.setAttribute('aria-label', 'New label');">Change label</button>Tests performed in Firefox (other browsers don't report aria-current changes).
Known issues with pull request:
None.
Change log entry:
Bug fixes:
- In Mozilla Firefox, when the focused element becomes marked as current (aria-current), this change is no longer spoken multiple times. (#8960)