microsoft / fluentui

Fluent UI web represents a collection of utilities, React components, and web components for building web applications.
https://react.fluentui.dev
Other
18.52k stars 2.73k forks source link

[Bug]: Combobox - Default - Screen reader doesn't narrate letter in input field combobox input #26359

Closed kolaps33 closed 1 year ago

kolaps33 commented 1 year ago

Library

React Northstar / v0 (@fluentui/react-northstar)

System Info

System:
    OS: Windows 10 10.0.22621
    CPU: (12) x64 Intel(R) Xeon(R) E-2176M  CPU @ 2.70GHz
    Memory: 12.51 GB / 31.74 GB
  Browsers:
    Edge: Spartan (44.22621.1105.0), Chromium (108.0.1462.76)
    Internet Explorer: 11.0.22621.1

Are you reporting Accessibility issue?

None

Reproduction

https://codesandbox.io/s/7mzpld?file=/example.tsx

Bug Description

Navigate between letters: Steps:

  1. Run JAWS or NVDA
  2. Navigate to combobox
  3. Write existing option like "Hamster"
  4. Navigate in the list pressing up/down arrow keys
  5. press left/right arrow keys to navigate between the letters which user typed in input
  6. observe screen reader behavior

Actual Behavior

screen reader is not narrating letters

Expected Behavior

screen reader narrate letters which user navigate on

Delete letters: Steps:

  1. Run JAWS or NVDA
  2. Navigate to combobox
  3. Write existing option like "Hamster"
  4. Navigate in the list pressing up/down arrow keys
  5. press backspace to delete last letter
  6. press backspace again to delete one more letter
  7. observe screen reader behavior

Actual Behavior

screen reader is not narrating deleted letters

Expected Behavior

screen reader narrate letters which user deleted

Comment: It works with ARIA example: https://w3c.github.io/aria-practices/examples/combobox/combobox-autocomplete-list.html Looks like issue is when we use left/right arrow keys we need to get screen reader focus on input. The similar with backspace, in order enable screen reader to narrate deleted letters we need to have screen reader focus on input. At least this is what I observe on ARIA example that screen reader focus ring moving to input when user navigate between letters or preses backspace.

Logs

No response

Requested priority

Normal

Products/sites affected

No response

Are you willing to submit a PR to fix?

no

Validations

smhigley commented 1 year ago

It's not a focus issue, since the input keeps focus throughout all combobox interactions. To me, this looks like a screen reader bug, though there is a workaround.

The APG example clears the aria-activedescendant id when the right or left arrows or home/end are pressed, or when the user deletes a letter. It also resets to the top of the list when you go to arrow down again.

I don't really like the reset behavior, but we could clear the attribute value when the insertion point moves as a temporary measure. I'll also file 3rd party bugs, this seems like a fairly severe issue on the screen reader side.