+
Skip to content
This repository was archived by the owner on Oct 14, 2025. It is now read-only.

Conversation

clintcs
Copy link
Collaborator

@clintcs clintcs commented Nov 8, 2024

🚀 Description

When filtering, the number of results currently isn't announced to screenreaders. This fixes that!

📋 Checklist

🔬 How to Test

  1. Turn of VoiceOver.
  2. Navigate to filterable Dropdown in Storybook.
  3. Tab to Dropdown.
  4. Press Space to open Dropdown.
  5. Verify the number of options is announced once.
  6. Press Option + Control + Shift + ArrowDown.
  7. Do some filtering.
  8. Verify the number of options is announced.

📸 Images/Videos of Functionality

N/A

Copy link

changeset-bot bot commented Nov 8, 2024

🦋 Changeset detected

Latest commit: b6c0434

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@crowdstrike/glide-core Patch

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

@clintcs clintcs force-pushed the dropdown-get-screenreaders-to-announce-results-count branch from 64e1e43 to b4213ae Compare November 8, 2024 21:03
Copy link
Contributor

github-actions bot commented Nov 8, 2024

@clintcs clintcs force-pushed the dropdown-get-screenreaders-to-announce-results-count branch from b4213ae to 6033d3b Compare November 8, 2024 21:10
@clintcs clintcs changed the title Dropdown get screenreaders to announce results count Dropdown get screenreaders to announce item count Nov 8, 2024
'itemCount',
this.itemCount.toString(),
)}
aria-live="assertive"
Copy link
Collaborator Author

@clintcs clintcs Nov 8, 2024

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?

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

Copy link
Collaborator Author

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?

Copy link

@noahgelmancs noahgelmancs Nov 12, 2024

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.

Copy link
Collaborator Author

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>();
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Unused.

@clintcs clintcs force-pushed the dropdown-get-screenreaders-to-announce-results-count branch 2 times, most recently from 06ec56b to 6ed6528 Compare November 8, 2024 21:26
@clintcs clintcs force-pushed the dropdown-get-screenreaders-to-announce-results-count branch from 6ed6528 to 70b9035 Compare November 8, 2024 21:27
@clintcs clintcs marked this pull request as ready for review November 8, 2024 21:28
@clintcs clintcs changed the title Dropdown get screenreaders to announce item count Dropdown: Get screenreaders to announce item count Nov 12, 2024
'[data-test="internal-label-tooltip"]',
);

await tooltip?.updateComplete;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@clintcs clintcs merged commit 603fc71 into main Nov 12, 2024
7 checks passed
@clintcs clintcs deleted the dropdown-get-screenreaders-to-announce-results-count branch November 12, 2024 20:46
@github-actions github-actions bot mentioned this pull request Nov 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载