Skip to content
This repository was archived by the owner on Mar 4, 2020. It is now read-only.

docs(Accessibility): add accessibility spec #2237

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

jurokapsiar
Copy link
Contributor

@jurokapsiar jurokapsiar commented Jan 14, 2020

This reflects current state of the framework, code and process used for Fluent components

@DustyTheBot
Copy link
Collaborator

DustyTheBot commented Jan 14, 2020

Warnings
⚠️ There are no updates provided to CHANGELOG. Ensure there are no publicly visible changes introduced by this PR.

Perf comparison

Status Scenario Fluent TPI Fabric TPI Ratio Iterations Ticks
🔧 Avatar.Fluent 0.81 0.5 1.62:1 2000 1628
🔧 Button.Fluent 1.45 0.23 6.3:1 1000 1451
🔧 Checkbox.Fluent 1.96 0.37 5.3:1 1000 1962
🔧 Dialog.Fluent 0.46 0.25 1.84:1 5000 2316
🔧 Dropdown.Fluent 4.71 0.49 9.61:1 1000 4705
🔧 Icon.Fluent 0.35 0.04 8.75:1 5000 1747
🔧 Image.Fluent 0.12 0.1 1.2:1 5000 612
🔧 Slider.Fluent 2 0.32 6.25:1 1000 1997
🦄 Text.Fluent 0.06 0.16 0.38:1 5000 324
🦄 Tooltip.Fluent 0.36 18.36 0.02:1 5000 1800

🔧 Needs work     🎯 On target     🦄 Amazing

Generated by 🚫 dangerJS

- macOS/Chrome - VoiceOver

## Contrast
- There has to be sufficient contrast between background and foreground of the component (text, icon...) in all component states and themes.
Copy link
Member

Choose a reason for hiding this comment

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

This could use more info, links to specs etc

Co-Authored-By: Makoto Morimoto <humbertomakotomorimoto@gmail.com>

## Zoom
- Elements need to be rendered correctly when zoomed up to 400%
- Content need to be able to [reflow](https://www.w3.org/WAI/WCAG21/Understanding/reflow.html)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
- Content need to be able to [reflow](https://www.w3.org/WAI/WCAG21/Understanding/reflow.html)
- Content needs to be able to [reflow](https://www.w3.org/WAI/WCAG21/Understanding/reflow.html)

<Checkbox aria-checked={false} ... />
```

Components also respect onKeyDown prop for event listeners. If used, the listener is called after the keys from the behavior have been processed.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Components also respect onKeyDown prop for event listeners. If used, the listener is called after the keys from the behavior have been processed.
Components also respect the `onKeyDown` prop for event listeners. If used, the listener is called after the keys from the behavior have been processed.

## Focus
- Whenever possible, focus should land only on elements that have concrete implicit or explicit ARIA role (`<button />`, `role='button'`, `role='menuitem'`, ....)
- onClick event handlers need to be handled on focusable elements with implicit or explicit ARIA role and not on their parent/child elements
- When reacting to on focus or on hover events, screen reader interaction needs to be specified. Some screen readers do not have the concept of hovering and not always focus elements, so the screen reader needs another way to interact with the elements. For example showing popups on focus or on hover needs to have an alternatve interaction compatible with the screen readers.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
- When reacting to on focus or on hover events, screen reader interaction needs to be specified. Some screen readers do not have the concept of hovering and not always focus elements, so the screen reader needs another way to interact with the elements. For example showing popups on focus or on hover needs to have an alternatve interaction compatible with the screen readers.
- When reacting to on focus or on hover events, screen reader interaction needs to be specified. Some screen readers do not have the concept of hovering and don't always focus elements, so the screen reader needs another way to interact with them. For example showing popups on focus or on hover needs to have an alternative interaction compatible with the screen readers.

- onClick event handlers need to be handled on focusable elements with implicit or explicit ARIA role and not on their parent/child elements
- When reacting to on focus or on hover events, screen reader interaction needs to be specified. Some screen readers do not have the concept of hovering and not always focus elements, so the screen reader needs another way to interact with the elements. For example showing popups on focus or on hover needs to have an alternatve interaction compatible with the screen readers.

## Screen reader support
Copy link
Contributor

Choose a reason for hiding this comment

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

Would be helpful to add guidance for scan mode or at least warnings of lack of scan mode support because a lot of issues coming in currently are regarding this special feature of Narrator (which since it is a Microsoft AT users expect our controls to work with it fully).

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants