Skip to content

Commit 08de791

Browse files
committed
updates
1 parent 1c4825a commit 08de791

File tree

1 file changed

+6
-17
lines changed

1 file changed

+6
-17
lines changed

packages/dev/s2-docs/pages/react-aria/concepts.mdx

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Accessible applications are usable by everyone, including people with disabiliti
1414

1515
React Aria provides built-in support for screen readers and keyboard navigation, following the [WAI-ARIA](https://www.w3.org/TR/wai-aria-1.2/) and [ARIA Authoring Practices](https://www.w3.org/WAI/ARIA/apg/) guidelines. It supplies the correct semantics via ARIA roles and attributes, handles keyboard and pointer events, manages focus, and provides screen reader announcements. React Aria components are tested across a wide variety of devices, browsers, and screen readers.
1616

17-
You’re responsible for providing meaningful labels and ensuring your visual design supports all users. This includes designing with sufficient [color contrast](https://www.w3.org/WAI/WCAG22/Understanding/non-text-contrast) and [hit target sizes](https://www.w3.org/WAI/WCAG22/Understanding/target-size-enhanced), including visible [focus rings](https://www.w3.org/WAI/WCAG22/Understanding/focus-appearance), respecting [motion preferences](https://www.w3.org/WAI/WCAG21/Understanding/animation-from-interactions), and more. The [WCAG guidelines](https://www.w3.org/WAI/WCAG22/Understanding/) are a good resource to reference when designing and building components with React Aria.
17+
Be sure to create an accessible visual design with meaningful labels, sufficient [color contrast](https://www.w3.org/WAI/WCAG22/Understanding/non-text-contrast) and [hit target sizes](https://www.w3.org/WAI/WCAG22/Understanding/target-size-enhanced), visible [focus rings](https://www.w3.org/WAI/WCAG22/Understanding/focus-appearance), and respect [motion preferences](https://www.w3.org/WAI/WCAG21/Understanding/animation-from-interactions). The [WCAG guidelines](https://www.w3.org/WAI/WCAG22/Understanding/) are a good resource to reference when designing and building components with React Aria.
1818

1919
### Labeling
2020

@@ -54,24 +54,13 @@ React Aria is tested across a variety of devices, browsers, and screen readers.
5454

5555
### Automated testing
5656

57-
Automated accessibility testing tools sometimes catch false positives in React Aria. These are documented in our [wiki](https://github.com/adobe/react-spectrum/wiki/Known-accessibility-false-positives). Use the rules below to ignore these issues in your own testing tools, such as in the [Storybook test runner](https://storybook.js.org/docs/7.1/react/writing-tests/accessibility-testing#a11y-config-with-the-test-runner) or [Storybook a11y addon](https://storybook.js.org/docs/7.1/react/writing-tests/accessibility-testing#global-a11y-configuration).
58-
59-
```tsx
60-
{
61-
rules: [
62-
{
63-
id: 'aria-hidden-focus',
64-
selector: 'body *:not([data-a11y-ignore="aria-hidden-focus"])'
65-
}
66-
]
67-
}
68-
```
57+
Automated accessibility testing tools sometimes catch false positives in React Aria. These are documented in our [wiki](https://github.com/adobe/react-spectrum/wiki/Known-accessibility-false-positives).
6958

7059
## Internationalization
7160

7261
Localization is an important way to make your application usable by the widest number of people. React Aria includes localized strings for 30+ languages, handles dates and numbers in many calendar and numbering systems, and supports right-to-left interactions (e.g. keyboard navigation).
7362

74-
You’re responsible for ensuring your design supports right-to-left layout, and adapts to different languages (e.g. using appropriate fonts). Modern CSS grid and flex layouts are automatically mirrored depending on the direction, and [logical properties](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_logical_properties_and_values) can be used to adapt margins, paddings, borders, etc.
63+
Make sure your design supports right-to-left layout, and adapts to different languages (e.g. using appropriate fonts). Modern CSS grid and flex layouts are automatically mirrored depending on the direction, and [logical properties](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_logical_properties_and_values) can be used to adapt margins, paddings, borders, etc.
7564

7665
### Setting the locale
7766

@@ -141,9 +130,9 @@ Modern web apps run on everything from desktops to mobile devices to TVs, with u
141130

142131
React Aria components provide data attributes and render props to style these states:
143132

144-
* `data-pressed` – like the `:active` pseudo class, but removed when dragging off the element.
145-
* `data-hovered` – like `:hover`, but does not apply on touch devices to avoid sticky hover states.
146-
* `data-focus-visible` – like `:focus-visible`, but avoids false positives from programmatic focus.
133+
* `data-pressed` – like the `:active` pseudo class, but removed when the pointer is dragged off.
134+
* `data-hovered` – like `:hover`, but not applied on touch devices, preventing sticky hover states.
135+
* `data-focus-visible` – like `:focus-visible`, but not on input click or programmatic focus.
147136

148137
These states also come with corresponding events such as `onPress` and `onHoverStart`. To use these events in your own custom components, see hooks such as [usePress](usePress.html), [useHover](useHover.html), [useMove](useMove.html), and [useFocusRing](useFocusRing.html).
149138

0 commit comments

Comments
 (0)