-
Notifications
You must be signed in to change notification settings - Fork 7
Dropdown: Get screenreaders to announce item count #466
Dropdown: Get screenreaders to announce item count #466
Conversation
🦋 Changeset detectedLatest commit: b6c0434 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
64e1e43
to
b4213ae
Compare
b4213ae
to
6033d3b
Compare
'itemCount', | ||
this.itemCount.toString(), | ||
)} | ||
aria-live="assertive" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@noahgelmancs: Debouncing aria-live="polite"
so that announcements for a series of keystrokes aren't delayed then read in succession turned out to add a lot of complication—specially on the testing side.
So I wonder what you think of using aria-live="assertive"
. It doesn't strike me as an inappropriate use of it. What you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's pretty assertive. I thought there was going to be a delay (until the use stops typing) before item-count
is updated so polite
only reads once? I think assertive
is too assertive
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought there was going to be a delay
Yeah, I mentioned that above in that adding a delay turned out to add a lot of complication.
I think assertive is too assertive
Given there won't be a delay, your preference is still for "polite", right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
polite
would be ideal, but not with the current repetition of information. If I had to pick between the 2 as it is now, assertive
is better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it. Thanks for chiming in.
|
||
#addButtonElementRef = createRef<HTMLButtonElement>(); | ||
|
||
#buttonElementRef = createRef<HTMLButtonElement>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused.
06ec56b
to
6ed6528
Compare
6ed6528
to
70b9035
Compare
'[data-test="internal-label-tooltip"]', | ||
); | ||
|
||
await tooltip?.updateComplete; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀 Description
When filtering, the number of results currently isn't announced to screenreaders. This fixes that!
📋 Checklist
🔬 How to Test
📸 Images/Videos of Functionality
N/A