You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -49,6 +51,16 @@ or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any addi
49
51
50
52
- Make and submit changes following the [pull request submission workflow](#pull-requests)
51
53
54
+
## Recommended VS Code Extensions
55
+
56
+
To ensure a consistent and productive development environment, install the following extensions in Visual Studio Code:
57
+
58
+
- [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) — Linting for JavaScript/TypeScript.
59
+
- [Jest Runner](https://marketplace.visualstudio.com/items?itemName=firsttris.vscode-jest-runner) — Run or debug Jest tests from context menu.
60
+
- [Prettier - Code formatter](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) — Code formatting using Prettier.
61
+
- [Prettier ESLint](https://marketplace.visualstudio.com/items?itemName=rvest.vs-code-prettier-eslint) — Format code with Prettier and ESLint integration.
62
+
- [markdownlint](https://marketplace.visualstudio.com/items?itemName=DavidAnson.vscode-markdownlint) — Linting and style checks for Markdown files.
# Accessibility: ColorSwatch must have an accessible name via aria-label, Tooltip, aria-labelledby, etc. (`@microsoft/fluentui-jsx-a11y/colorswatch-needs-labelling`)
2
+
3
+
💼 This rule is enabled in the ✅ `recommended` config.
# Accessibility: EmptySwatch must have an accessible name via aria-label, Tooltip, aria-labelledby, etc. (`@microsoft/fluentui-jsx-a11y/emptyswatch-needs-labelling`)
2
+
3
+
💼 This rule is enabled in the ✅ `recommended` config.
4
+
5
+
<!-- end auto-generated rule header -->
6
+
7
+
All interactive elements must have an accessible name.
8
+
9
+
`EmptySwatch` without a supported label lacks an accessible name for assistive technology users.
10
+
11
+
## Allowed labelling strategies
12
+
13
+
- ✅ `aria-label`**on `EmptySwatch`**
14
+
- ✅ `aria-labelledby`**on `EmptySwatch`**
15
+
- ✅ `htmlFor`/`id` (native `<label htmlFor="…">` ↔ `id="…"` on `EmptySwatch`)
16
+
- ✅ Wrapping native `<label>…</label>`
17
+
- ✅ `Tooltip` parent with `relationship="label"`
18
+
- ✅ Text content child (e.g., `<EmptySwatch>None</EmptySwatch>`)
19
+
- ❌ `Field` parent (not allowed for `EmptySwatch`)
20
+
- ❌ Container-only label (e.g., only the surrounding `SwatchPicker` is labelled)
21
+
22
+
## Ways to fix
23
+
24
+
- Add `aria-label`/`aria-labelledby` to `EmptySwatch`.
25
+
- Use `<label htmlFor="…">` + `id="…"` on `EmptySwatch`.
26
+
- Wrap in a native `<label>` or `Tooltip (relationship="label")`.
27
+
- Provide meaningful text **as the child** of `EmptySwatch`.
28
+
29
+
## Rule Details
30
+
31
+
This rule ensures `EmptySwatch` is labelled using **allowed** mechanisms.
32
+
33
+
### Examples of **incorrect** code
34
+
35
+
```jsx
36
+
// No label
37
+
<SwatchPicker>
38
+
<EmptySwatch value="none"/>
39
+
</SwatchPicker>
40
+
```
41
+
42
+
```jsx
43
+
// Container-only label: EmptySwatch itself is unnamed
# Accessibility: ImageSwatch must have an accessible name via aria-label, Tooltip, aria-labelledby, etc. (`@microsoft/fluentui-jsx-a11y/imageswatch-needs-labelling`)
2
+
3
+
💼 This rule is enabled in the ✅ `recommended` config.
4
+
5
+
<!-- end auto-generated rule header -->
6
+
7
+
All interactive elements must have an accessible name.
8
+
9
+
`ImageSwatch` without a supported label lacks an accessible name for assistive technology users.
10
+
11
+
## Allowed labelling strategies
12
+
13
+
- ✅ `aria-label`**on `ImageSwatch`**
14
+
- ✅ `aria-labelledby`**on `ImageSwatch`**
15
+
- ✅ Wrapping native `<label>…</label>`
16
+
- ✅ `Tooltip` parent with `relationship="label"` (e.g., from Fluent UI)
17
+
- ❌ `Field` parent (not allowed for `ImageSwatch`)
18
+
- ❌ `htmlFor`/`id` (not allowed for `ImageSwatch`)
19
+
- ❌ Text content child (not allowed)
20
+
- ❌ Container-only label (e.g., only the surrounding `SwatchPicker` is labelled)
21
+
22
+
## Ways to fix
23
+
24
+
- Add `aria-label` or `aria-labelledby`**directly** to `ImageSwatch`.
25
+
- Wrap the swatch in a native `<label>…</label>` with descriptive text.
26
+
- Wrap in a `Tooltip` with `relationship="label"` and meaningful `content`.
27
+
28
+
## Rule Details
29
+
30
+
This rule ensures `ImageSwatch` receives a name via **supported** mechanisms.
31
+
32
+
### Examples of **incorrect** code
33
+
34
+
```jsx
35
+
// No label at all
36
+
<SwatchPicker>
37
+
<ImageSwatch src="/none.png" value="none"/>
38
+
</SwatchPicker>
39
+
```
40
+
41
+
```jsx
42
+
// Container-only label: ImageSwatch itself is unnamed
0 commit comments