Skip to content

Commit 61ce8a7

Browse files
authored
docs: Add Quality page (#9099)
* docs: Add concepts page * Fix description * updates * Rename to quality * Standardize format of guide page descriptions * fix links * relative URLs
1 parent 075f2ed commit 61ce8a7

File tree

18 files changed

+183
-54
lines changed

18 files changed

+183
-54
lines changed

packages/dev/s2-docs/pages/react-aria/blog/introducing-react-spectrum.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ We're excited to announce [React Spectrum](https://react-spectrum.adobe.com/inde
4848

4949
## Features
5050

51-
- ♿️ [**Accessible**](../concepts.html#accessibility) – Accessibility and behavior is implemented according to [WAI-ARIA Authoring Practices](https://www.w3.org/TR/wai-aria-practices-1.2/), including full screen reader and keyboard navigation support. All components have been tested across a wide variety of screen readers and devices to ensure the best experience possible for all users.
52-
- 📱 [**Adaptive**](../concepts.html#interactions) – All components are designed to work with mouse, touch, and keyboard interactions. They're built with responsive design principles to deliver a great experience, no matter the device.
53-
- 🌍 [**International**](../concepts.html#internationalization) – Support for more than 30 languages is included out of the box, with support for right-to-left languages, date and number formatting, and more.
51+
- ♿️ [**Accessible**](../quality.html#accessibility) – Accessibility and behavior is implemented according to [WAI-ARIA Authoring Practices](https://www.w3.org/TR/wai-aria-practices-1.2/), including full screen reader and keyboard navigation support. All components have been tested across a wide variety of screen readers and devices to ensure the best experience possible for all users.
52+
- 📱 [**Adaptive**](../quality.html#interactions) – All components are designed to work with mouse, touch, and keyboard interactions. They're built with responsive design principles to deliver a great experience, no matter the device.
53+
- 🌍 [**International**](../quality.html#internationalization) – Support for more than 30 languages is included out of the box, with support for right-to-left languages, date and number formatting, and more.
5454
- 🎨 [**Customizable**](../../s2/styling.html) – React Spectrum automatically adapt for dark mode. For even more customizability, you can build your own components with your own DOM structure and styling using the [React Aria](../index.html) and [React Stately](https://react-spectrum.adobe.com/react-stately/index.html) hooks to provide behavior, accessibility, and interactions.
5555

5656
Adobe is a large company with thousands of engineers working on hundreds of products, which must all meet high standards for UI consistency, accessibility, internationalization, and usability. Meeting these standards at our scale has been a challenge, and we're excited to share what we've learned with the community and raise the bar for web applications together.
@@ -79,7 +79,7 @@ React Stately can be used independently in your own components, or paired with R
7979

8080
### React Aria
8181

82-
[React Aria](../index.html) implements behavior and [accessibility](../concepts.html#accessibility) for the web according to the [WAI-ARIA Authoring Practices](https://www.w3.org/TR/wai-aria-practices-1.2/). It includes full screen reader and keyboard navigation support, along with mouse and touch [interactions](../concepts.html#interactions) that have been tested across a wide variety of devices and browsers. It also implements [internationalization](../concepts.html#internationalization) for over 30 languages, with right-to-left specific behavior, localized date and number formatting, and more.
82+
[React Aria](../index.html) implements behavior and [accessibility](../quality.html#accessibility) for the web according to the [WAI-ARIA Authoring Practices](https://www.w3.org/TR/wai-aria-practices-1.2/). It includes full screen reader and keyboard navigation support, along with mouse and touch [interactions](../quality.html#interactions) that have been tested across a wide variety of devices and browsers. It also implements [internationalization](../quality.html#internationalization) for over 30 languages, with right-to-left specific behavior, localized date and number formatting, and more.
8383

8484
React Aria does not contain any design system specific styling or logic. It implements event handling, accessibility, internationalization, etc. — all the parts of a component that could be shared across multiple design systems. It returns DOM props that can be spread onto the elements rendered by the component. These include semantic properties like [ARIA](https://www.w3.org/TR/wai-aria-1.2/), and event handlers. The event handlers in turn call methods on the state interface to implement the behavior for the component.
8585

@@ -118,7 +118,7 @@ function Switch(props) {
118118
<Switch>Test</Switch>
119119
```
120120

121-
[Read more](../concepts.html) about React Aria and the problems it solves, and check out the docs to [get started](../getting-started.html) building your own design system.
121+
[Read more](../quality.html) about React Aria and the problems it solves, and check out the docs to [get started](../getting-started.html) building your own design system.
122122

123123
### React Spectrum
124124

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ import docs from 'docs:react-aria-components';
55
import {InlineAlert, Heading, Content} from '@react-spectrum/s2'
66

77
export const section = 'Guides';
8-
export const description = 'Implementing collections in React Aria';
8+
export const description = 'How to load and render collections.';
99

1010
# Collections
1111

12-
<PageDescription>Many components display a collection of items, and provide functionality such as keyboard navigation, selection, and more. React Aria has a consistent, compositional API to define the items displayed in these components.</PageDescription>
12+
<PageDescription>Many components display a collection of items, and provide functionality such as keyboard navigation, and selection. Learn how to load and render collections using React Aria's compositional API.</PageDescription>
1313

1414
## Static collections
1515

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ export default Layout;
44
import docs from 'docs:react-aria-components';
55

66
export const section = 'Guides';
7-
export const description = 'Building custom component patterns';
7+
export const description = 'How to build custom component patterns.';
88

99
# Customization
1010

11-
React Aria Components is built using a flexible and composable API that you can extend to build new patterns. If you need even more customizability, drop down to the lower level Hook-based API for even more control over rendering and behavior. Mix and match as needed.
11+
<PageDescription>React Aria is built using a flexible and composable API. Learn how to use contexts and slots to create custom component patterns, or mix and match with the lower level Hook-based API for even more control over rendering and behavior.</PageDescription>
1212

1313
## Contexts
1414

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ import {PokemonListBox} from './PokemonListBox';
1313
import {PokemonGridList} from './PokemonGridList';
1414

1515
export const section = 'Guides';
16-
export const description = 'Implementing drag and drop in React Aria';
16+
export const description = 'How to implement drag and drop.';
1717

1818
# Drag and Drop
1919

20-
<PageDescription>Drag and drop is an intuitive way for users to transfer data between locations. React Aria implements drag and drop for mouse and touch interactions, and provides full keyboard and screen reader accessibility.</PageDescription>
20+
<PageDescription>React Aria collection components support drag and drop with mouse and touch interactions, and full keyboard and screen reader accessibility. Learn how to provide drag data and handle drop events to move, insert, or reorder items.</PageDescription>
2121

2222
## Introduction
2323

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ import {InlineAlert, Heading, Content} from '@react-spectrum/s2';
55

66
export const section = 'Guides';
77
export const tags = ['forms', 'validation'];
8-
export const description = 'Building accessible forms with React Aria';
8+
export const description = 'How to build accessible forms with validation.';
99

1010
# Forms
1111

12-
<PageDescription>Forms allow users to enter and submit data, and provide them with feedback along the way. React Aria includes many components that integrate with HTML forms, with support for custom validation and styling.</PageDescription>
12+
<PageDescription>Learn how to integrate with HTML forms, validate and submit data, and use React Aria with form libraries.</PageDescription>
1313

1414
## Labels and help text
1515

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ import Routers from '../../src/routers.mdx';
1717

1818
export const section = 'Guides';
1919
export const tags = ['framework', 'setup', 'routing', 'ssr'];
20-
export const description = 'Integrate React Aria with your framework';
20+
export const description = 'How to integrate with your framework.';
2121

2222
# Framework setup
2323

24-
<PageDescription>How to integrate React Aria with your framework.</PageDescription>
24+
<PageDescription>Learn how to integrate React Aria with your framework.</PageDescription>
2525

2626
<Tabs aria-label="Frameworks" density="compact">
2727
<TabList><Tab id="next"><Nextjs /><Text>Next.js</Text></Tab><Tab id="react-router"><ReactRouter /><Text>React Router</Text></Tab><Tab id="parcel"><Parcel /><Text>Parcel</Text></Tab><Tab id="vite"><Vite /><Text>Vite</Text></Tab><Tab id="webpack"><Webpack /><Text>webpack</Text></Tab><Tab id="rollup"><Rollup /><Text>Rollup</Text></Tab><Tab id="esbuild"><ESBuild /><Text>ESBuild</Text></Tab></TabList>

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ export const hideFromSearch = true;
305305
<Section className="cyan-gradient-background">
306306
<h2><GradientText>High quality</GradientText> <span className="bg-clip-text bg-linear-to-t from-cyan-600 to-green-600">interactions</span> <GradientText>on all devices.</GradientText></h2>
307307
<p className="m-0">React Aria ensures a great experience for users, no matter their device. All components are optimized for mouse, touch, keyboard, and screen reader interactions, with a meticulous attention to detail that makes your app feel responsive and natural on every platform.</p>
308-
<LearnMoreLink href="interactions.html" className="text-cyan-700 dark:text-cyan-600 hover:bg-cyan-400/[15%]" />
308+
<LearnMoreLink href="quality.html#interactions" className="text-cyan-700 dark:text-cyan-600 hover:bg-cyan-400/[15%]" />
309309

310310
<PaginatedCarousel className="grid gap-4 md:gap-6 grid-cols-[repeat(4,100%)] md:grid-cols-2 md:grid-rows-2 -mx-8 md:mx-0 px-8 md:px-0 py-4 md:py-0 overflow-auto md:overflow-visible snap-x snap-mandatory no-scrollbar" paginationClassName="md:hidden">
311311
<Card>
@@ -347,7 +347,7 @@ export const hideFromSearch = true;
347347
<Section className="blue-gradient-background">
348348
<h2><span className="bg-clip-text bg-linear-to-b from-sky-500 to-indigo-600">Accessibility</span> <GradientText>that's truly first-class.</GradientText></h2>
349349
<p className="m-0">React Aria is designed with accessibility as a top priority, and battle tested in production applications. All components are built to work across a wide variety of devices and assistive technologies to ensure the best experience possible for all users.</p>
350-
<LearnMoreLink href="accessibility.html" className="text-blue-600 dark:text-blue-500 hover:bg-blue-400/[15%]" />
350+
<LearnMoreLink href="quality.html#accessibility" className="text-blue-600 dark:text-blue-500 hover:bg-blue-400/[15%]" />
351351

352352
<div className="grid gap-y-6 gap-x-20 md:grid-cols-[min-content_auto] md:grid-flow-col place-items-center">
353353
<div className="w-full max-w-xs md:w-auto md:max-w-none md:row-span-3 md:h-full aspect-1/2 iphone-frame md:order-4">
@@ -376,7 +376,7 @@ export const hideFromSearch = true;
376376
<Section className="orange-gradient-background">
377377
<h2><GradientText>Ready for an</GradientText> <span className="bg-clip-text bg-linear-to-b from-yellow-500 to-orange-600">international</span> <GradientText>audience.</GradientText></h2>
378378
<p className="m-0">React Aria is engineered for internationalization out of the box, including translations in over 30 languages, localized date and number formatting and parsing, support for 13 calendar systems, 5 numbering systems, right-to-left layout, and more.</p>
379-
<LearnMoreLink href="internationalization.html" className="text-orange-700 dark:text-orange-600 hover:bg-orange-400/[15%]" />
379+
<LearnMoreLink href="quality.html#internationalization" className="text-orange-700 dark:text-orange-600 hover:bg-orange-400/[15%]" />
380380
<I18n />
381381
</Section>
382382

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ import {Link} from '@react-spectrum/s2';
55
export default Layout;
66

77
export const section = 'Guides';
8-
export const description = 'MCP Server for React Aria';
8+
export const description = 'How to use the React Aria MCP Server.';
99
export const tags = ['mcp', 'ai', 'documentation', 'tools'];
1010

1111
# MCP Server
1212

13-
The `@react-spectrum/mcp` package allows you to run [Model Context Protocol (MCP)](https://modelcontextprotocol.io/docs/getting-started/intro) servers for React Aria locally. It exposes a set of tools that MCP clients can discover and call to browse the docs.
13+
<PageDescription>Learn how to use the React Aria [MCP](https://modelcontextprotocol.io/docs/getting-started/intro) server to help AI agents browse the documentation.</PageDescription>
1414

1515
## Using with an MCP client
1616

Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
import {Layout} from '../../src/Layout';
2+
export default Layout;
3+
4+
export const section = 'Guides';
5+
export const description = 'How to build with accessibility, internationalization, and interactions.';
6+
7+
# Quality
8+
9+
<PageDescription>React Aria is built around three core principles: **Accessibility**, **Internationalization**, and **Interactions**. Learn how to apply these tools to build high quality UIs that work for everyone, everywhere, and on every device.</PageDescription>
10+
11+
## Accessibility
12+
13+
Accessible applications are usable by everyone, including people with disabilities. Accessibility benefits all users — not just those using assistive technologies — by improving efficiency, consistency, and usability.
14+
15+
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.
16+
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.
18+
19+
### Labeling
20+
21+
Most components should have a visible label, which is usually provided by rendering a `<Label>` element within it. This is associated with the component automatically.
22+
23+
```tsx
24+
import {TextField, Label, Input} from 'react-aria-components';
25+
26+
<TextField>
27+
{/*- begin highlight -*/}
28+
<Label>First name</Label>
29+
{/*- end highlight -*/}
30+
<Input />
31+
</TextField>
32+
```
33+
34+
When a component doesn't have a visible label, it must have an [aria-label](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-label) or [aria-labelledby](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-labelledby) prop to provide an accessible name.
35+
36+
```tsx
37+
import {ProgressBar} from 'react-aria-components';
38+
39+
<ProgressBar
40+
/*- begin highlight -*/
41+
aria-label="Processing" />
42+
/*- end highlight -*/
43+
```
44+
45+
### Supported screen readers
46+
47+
React Aria is tested across a variety of devices, browsers, and screen readers.
48+
49+
* [VoiceOver on macOS](https://www.apple.com/accessibility/mac/vision/) in Safari and Chrome
50+
* [JAWS](https://www.freedomscientific.com/products/software/jaws/) on Windows in Firefox and Chrome
51+
* [NVDA](https://www.nvaccess.org) on Windows in Firefox and Chrome
52+
* [VoiceOver on iOS](https://www.apple.com/accessibility/iphone/vision/)
53+
* [TalkBack](https://www.android.com/accessibility/) on Android in Chrome
54+
55+
### Automated testing
56+
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).
58+
59+
## Internationalization
60+
61+
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).
62+
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.
64+
65+
### Setting the locale
66+
67+
React Aria automatically detects the user's current language by default. Use the `I18nProvider` component to set the locale to a specific value. You should also set the `lang` and `dir` attributes on the root-most element of your application.
68+
69+
```tsx
70+
import {I18nProvider, useLocale} from 'react-aria-components';
71+
72+
<I18nProvider locale="fr-FR">
73+
<App />
74+
</I18nProvider>
75+
76+
function App() {
77+
let {locale, direction} = useLocale();
78+
79+
return (
80+
<html lang={locale} dir={direction}>
81+
{/* your app here */}
82+
</html>
83+
);
84+
}
85+
```
86+
87+
### Supported locales
88+
89+
<ul style={{columnWidth: 200, paddingLeft: 16, fontFamily: 'adobe-clean-spectrum-vf'}}>
90+
<li>Arabic (United Arab Emirates)</li>
91+
<li>Bulgarian (Bulgaria)</li>
92+
<li>Chinese (Simplified)</li>
93+
<li>Chinese (Traditional)</li>
94+
<li>Croatian (Croatia)</li>
95+
<li>Czech (Czech Republic)</li>
96+
<li>Danish (Denmark)</li>
97+
<li>Dutch (Netherlands)</li>
98+
<li>English (Great Britain)</li>
99+
<li>English (United States)</li>
100+
<li>Estonian (Estonia)</li>
101+
<li>Finnish (Finland)</li>
102+
<li>French (Canada)</li>
103+
<li>French (France)</li>
104+
<li>German (Germany)</li>
105+
<li>Greek (Greece)</li>
106+
<li>Hebrew (Israel)</li>
107+
<li>Hungarian (Hungary)</li>
108+
<li>Italian (Italy)</li>
109+
<li>Japanese (Japan)</li>
110+
<li>Korean (Korea)</li>
111+
<li>Latvian (Latvia)</li>
112+
<li>Lithuanian (Lithuania)</li>
113+
<li>Norwegian (Norway)</li>
114+
<li>Polish (Poland)</li>
115+
<li>Portuguese (Brazil)</li>
116+
<li>Romanian (Romania)</li>
117+
<li>Russian (Russia)</li>
118+
<li>Serbian (Serbia)</li>
119+
<li>Slovakian (Slovakia)</li>
120+
<li>Slovenian (Slovenia)</li>
121+
<li>Spanish (Spain)</li>
122+
<li>Swedish (Sweden)</li>
123+
<li>Turkish (Turkey)</li>
124+
<li>Ukrainian (Ukraine)</li>
125+
</ul>
126+
127+
## Interactions
128+
129+
Modern web apps run on everything from desktops to mobile devices to TVs, with users interacting through mouse, touch, keyboard, and assistive technologies. React Aria normalizes these differences, delivering consistent “press”, “hover”, and “focus” behaviors across all browsers and input types.
130+
131+
React Aria components provide data attributes and render props to style these states:
132+
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.
136+
137+
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).
138+
139+
Read our blog post series to learn more about the intricacies behind these interactions.
140+
141+
* [Building a Button Part 1: Press Events](blog/building-a-button-part-1.html)
142+
* [Building a Button Part 2: Hover Interactions](blog/building-a-button-part-2.html)
143+
* [Building a Button Part 3: Keyboard Focus Behavior](blog/building-a-button-part-3.html)
144+
145+
Higher level interaction patterns such as [selection](selection.html) and [drag and drop](dnd.html) are also built on top of these low level primitives.

0 commit comments

Comments
 (0)