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: announce teams channel results when you type #2561

Merged
merged 14 commits into from Jul 17, 2023
Merged

fix: announce teams channel results when you type #2561

merged 14 commits into from Jul 17, 2023

Conversation

gavinbarron
Copy link
Member

Closes #2292

PR Type

  • Bugfix

Description of the changes

  • Announce the rendered results in the dropdown
  • Announce the filtered resutls in the drop down

PR checklist

  • Project builds (yarn build) and changes have been tested in at least two supported browsers (Edge + non-Chromium based browser)
  • All public APIs (classes, methods, etc) have been documented following the jsdoc syntax
  • Stories have been added and existing stories have been tested
  • Added appropriate documentation. Docs PR:
  • License header has been added to all new source files (yarn setLicense)
  • Contains NO breaking changes

Other information

Replacement for #2539

Signed-off-by: Martin Musale <martinmusale@microsoft.com>
Signed-off-by: Martin Musale <martinmusale@microsoft.com>
Signed-off-by: Martin Musale <martinmusale@microsoft.com>
@gavinbarron gavinbarron requested a review from a team as a code owner June 27, 2023 16:10
@ghost
Copy link

ghost commented Jun 27, 2023

Thank you for creating a Pull Request @gavinbarron.

This is a checklist for the PR reviewer(s) to complete before approving and merging this PR:

  • I have verified a documentation PR has been linked and is approved (or not applicable)
  • I have ran this PR locally and have tested the fix/feature
  • I have verified that stories have been added to storybook (or not applicable)
  • I have tested existing stories in storybook to verify no regression has occured
  • I have tested the solution in at least two browsers (Edge + 1 non-Chromium based browser)

@github-actions
Copy link

The updated storybook is available here

@musale
Copy link
Contributor

musale commented Jun 27, 2023

Adding this here:

@microsoft-graph-toolkit-write this should work BUT I have found an issue in handling the state of component. Visually, everything looks like it's working correctly. Using narrator, other bugs come up.

Repro 1

  • Open teams-channel-picker with narrator ON.
  • Focus on the input. This will announce the results CORRECTLY.
  • type a single letter. This will announce the filtered results CORRECTLY.
  • Type the second later. Nothing is announced.
  • Delete everything. Nothing is announced.

This is a different experience in the people-picker.

Any ideas to fix this experience are very welcome 😄

@gavinbarron
Copy link
Member Author

So what I think is happening is that as the element gets filtered elements are removed from the DOM.

On the first keystroke the tree gets expanded and the child nodes rendered, which is an additive change.
On the second keystroke some of the things get removed. The problem here is that aria-live only knows to announce when things are added to the list by default

Let's try adding aria-relevant="all" to have deletions trigger the live behavior and aria-atomic="true" to ensure that the whole tree is announced when we add the children.

@github-actions
Copy link

The updated storybook is available here

@github-actions
Copy link

The updated storybook is available here

…lues in the dropdown

Signed-off-by: Martin Musale <martinmusale@microsoft.com>
@github-actions
Copy link

github-actions bot commented Jul 4, 2023

The updated storybook is available here

@github-actions
Copy link

The updated storybook is available here

1 similar comment
@github-actions
Copy link

The updated storybook is available here

@vagpt
Copy link
Collaborator

vagpt commented Jul 14, 2023

Hi @gavinbarron.

This issue is fixed partially as on typing random text or incorrect data instead of 'We didn't find any matches' it is announcing the information about the default list item i.e. 'HR Taskforce, Business Development and X1050 Launch Team' which is irrelevant for the user. Simply screen reader should announce the error message only to the user as 'We didn't find any matches'.

Test Environment:
URL: https://mgt.dev/next/pr/2561/?path=/story/components-mgt-teams-channel-picker--teams-channel-picker
OS Version: 23H2(OS Build 25905.1000)
Browser Version: Version 116.0.1938.16 (Official build) dev (64-bit)
Screen Reader: Narrator

Attachment:

MGTP.-.Issue.is.partially.fixed.mp4

@github-actions
Copy link

The updated storybook is available here

@github-actions
Copy link

The updated storybook is available here

@gavinbarron gavinbarron enabled auto-merge (squash) July 17, 2023 15:47
@gavinbarron gavinbarron merged commit 5260ce0 into main Jul 17, 2023
7 checks passed
@gavinbarron gavinbarron deleted the bug-2292 branch July 17, 2023 15:57
gavinbarron added a commit that referenced this pull request Aug 21, 2023
Removes lostFocus guards
Adds aria-atomic and aria-relevant attributes to cater for changing values in the dropdown
Adding aria-live and other roles to no results template to ensure annoucing
Shortened people picker placeholder to ensure it doesn't overflow with increased text spacing

---------

Signed-off-by: Martin Musale <martinmusale@microsoft.com>
Co-authored-by: Martin Musale <martinmusale@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
4 participants