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.53k stars 2.74k forks source link

chore: Field accessibility review #26604

Closed behowell closed 1 year ago

behowell commented 1 year ago

This accessibility review checklist is primarily geared towards evaluating the accessibility of new components, or major design changes or new features in existing components. Detailed steps are included in the section for each high-level item. Skip any tests or sub-tests that you do not feel comfortable evaluating, and either pair with or hand off the issue to an accessibility SME for any remaining items.

Note: these checks are geared towards catching component-level accessibility issues. They are not comprehensive, and this is not the correct checklist for evaluating page- or app-level accessibility.

Testing Notes

### Issues found
- [ ] Field error/warning/success icons have no color in high contrast (forced colors)
- [ ] Field warning/success state changes are not conveyed to accessibility tools (no `role="alert"`)
- [ ] https://github.com/microsoft/fluentui/issues/27453
- [ ] Narrator does not read aria-describedby for `<input type="range">` or `<input type="number">`: https://codepen.io/behowell/pen/mdzdyeE

Color contrast

Steps

  1. Find all the states of the component (hover, pressed, disabled, open/closed, selected, etc) that affect the visual presentation. For each state, check the following:
    • Text contrast
    • Contrast of any other meaningful visual information (e.g. icons, boundary of text inputs/buttons, etc.)
    • Focus indicator contrast
    • If the state is meaningful (focus, selected, error, etc.), check that the state itself has a contrasting difference vs. the rest state.
  2. Find all permutations of props and children that affect visual presentation. For example, if a selectable gridcell can contain links, test the link text contrast against both the rest state and selected state.

Checks

References


High Contrast Mode

Steps

  1. Turn on Windows high contrast mode (must be tested in Windows, browser extensions do not apply)
  2. For all steps, check at least one light and one dark theme. For Windows 11, this means one theme with dark text on a light bg, and one theme with light text on a dark bg
  3. Find all permutations of state, props, and children that affect the visual presentation. For each, check the following:
    • All text and meaningful graphics are visible
    • All states are easy to perceive an understand (e.g. a selected tab looks like a selected tab)
    • Colors that have semantic meaning are used correctly, where applicable
    • There are no large areas of the screen where the chosen text/background color is overridden or inverted

Checks

References


Zoom and Reflow

Steps

  1. Open a window with only the control (e.g. no Storybook panels or UI)
  2. Use some combination of window resizing and zoom to set the brower viewport to 320px by 256px
  3. Find all permutations of state, props, and children that affect layout (e.g. opening a combobox, or expanding multiple levels of dropdown menus), and check that the control is visually and functionally coherent.
  4. If the control accepts any freeform text content (via children, slots, or props), create a test case that inserts and absurdly long text string in all possible places, and then do steps 1-3.

Checks

References


Pointer access

Steps

  1. Use a touchscreen, if available, to operate the control.

Checks

If a touchscreen isn't available, use common sense/maybe devtools? to mimic a lack of hover.

Note -- this is not only about touch access. A number of assistive tech devices function like a pointer, but lack hover (e.g. eye control or switch control).


Keyboard access

Steps

  1. Using only a keyboard (and not a screen reader), perform all available interactions on the control. For each component state and interaction, check the following:
    • The interaction can be performed with roughly equivalent efficiency between mouse and keyboard
    • Keyboard focus through tab/arrow keys only goes to elements with interactive roles
    • All visual information available with a mouse is also available with the keyboard
  2. For each separate control that has internally managed keyboard handling (including through tabster), make note of the overall tab/arrow/etc. behavior
    • Compare the overall keyboard interaction to the expected keyboard interaction based on the control's semantics

Checks

References


Code conformance

Steps

  1. Find all the states of the component (hover, focus, pressed, open/closed, selected, etc) that affect the accessibility tree. For each state, do the following:
  2. Find all permutations of props and children that affect the accessibility tree. For each, do step 1 again.
  3. Find all instances of built-in visually hidden text, and verify they follow our localization pattern

Checks

To check for valid semantics, look at the following:

To check for visually-hidden text:

References


Screen reader access

Screen reader combinations:

  1. Windows screen readers:
    • JAWS + Chrome or Edge
    • NVDA + Chrome or Edge
    • NVDA + Firefox
    • Narrator + Edge
  2. macOS:
    • VoiceOver + Safari
    • (Optional): VoiceOver + Chrome (since all Electron apps effectively use Chrome, which affects VoiceOver)
  3. Touch screen readers:
    • iOS VoiceOver + Safari
    • Android Talkback + Chrome

Steps

For Windows screen readers:

  1. Use the screen reader solely in virtual cursor/scan mode/browse mode
  2. Use the screen reader relying fully on automatic mode changes

For VoiceOver on macOS:

  1. Navigate item-by-item through the entire control
  2. Use the rotor to jump to all relevant element types
  3. Tab or use available keyboard interactions to navigate through all interactive items

Touch screen readers:

  1. Swipe through the entire control item-by-item
  2. Use the rotor/shortcuts to jump by element type, where applicable in the control
  3. Use touch exploration for all elements present on the control in all control states

Checks

For all screen readers, within all screen-reader-specific tests, check the following:

Specific per-screen-reader checks:

  1. Windows
    • When tabbing or otherwise moving focus, without manually changing modes, auto-mode-changes occur as expected for the focused element
      • [x] N/A
    • While relying on auto-mode-changes, all custom managed keyboard interaction is available (except for known screen-reader-specific mode change bugs)
      • [x] N/A
    • While staying solely in virtual cursor/scan mode/browse mode, all information and interactions are available (exception: some form controls require forms/application mode to operate, and this is expected. Mostly applies to combobox and tree.)
      • [x] N/A
    • All relevant component-type shortcuts (e.g. "c" for comboboxes) bring the cursor to the correct element
      • [x] N/A
    • item-by-item navigation reaches all relevant elements
      • [ ] JAWS + Chrome or Edge
      • [ ] NVDA + Chrome or Edge
      • [ ] NVDA + Firefox
      • [x] Narrator + Edge
  2. macOS
    • [ ] Check that using the rotor brings the VO cursor to the correct place
    • [ ] Check that no shortcuts are missing from the rotor
  3. Touch
    • When swiping, pay extra attention to any popups, menus, tooltips, dialogs, etc. -- ensure that their contents are accessible via swiping
      • [ ] VoiceOver + Safari, iOS
      • [ ] Talkback + Chrome on Android
    • Using the rotor/talkback shortcuts to jump to a specific type of element puts the cursor on the correct element
      • [ ] VoiceOver + Safari, iOS
      • [ ] Talkback + Chrome on Android
    • No element-specific shortcuts should be missing from the VO rotor/talkback
      • [ ] VoiceOver + Safari, iOS
      • [ ] Talkback + Chrome on Android
    • Touch exploration should surface all available items (if there are menus/popups/etc, make sure to test both open and closed states)
      • [ ] VoiceOver + Safari, iOS
      • [ ] Talkback + Chrome on Android
    • Touch exploration should match screen reader announcements with visual items and placement. For example: a checkbox or slider should be findable with the screen reader in the same area it is visually rendered.
      • [ ] VoiceOver + Safari, iOS
      • [ ] Talkback + Chrome on Android

References

This test requires a broad knowledge of screen readers; specific references won't be too helpful. This should generally be done with or by someone who is confident in using and interpreting screen readers.

microsoft-github-policy-service[bot] commented 1 year ago

Because this issue has not had activity for over 150 days, we're automatically closing it for house-keeping purposes.

Still require assistance? Please, create a new issue with up-to date details.