@erclx/aitk 0.99.0 → 0.99.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: Enforce UI copy and text standards for rendered strings in
|
|
2
|
+
description: Enforce UI copy and text standards for rendered strings in components
|
|
3
3
|
paths:
|
|
4
4
|
- '**/*.tsx'
|
|
5
5
|
- '**/*.jsx'
|
|
6
|
+
- '**/*.astro'
|
|
6
7
|
---
|
|
7
8
|
|
|
8
9
|
# UI copy standards
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: Keyboard interaction, focus management, and ARIA accessibility for
|
|
2
|
+
description: Keyboard interaction, focus management, and ARIA accessibility for rendered UI
|
|
3
3
|
paths:
|
|
4
4
|
- '**/*.tsx'
|
|
5
5
|
- '**/*.jsx'
|
|
6
|
+
- '**/*.astro'
|
|
6
7
|
---
|
|
7
8
|
|
|
8
9
|
# Accessibility and keyboard standards
|
|
@@ -34,8 +35,9 @@ paths:
|
|
|
34
35
|
|
|
35
36
|
## ARIA semantics
|
|
36
37
|
|
|
37
|
-
- Use semantic HTML over custom elements: `<button>` over `<div
|
|
38
|
-
- A `<div>` with
|
|
38
|
+
- Use semantic HTML over custom elements: `<button>` over a `<div>` carrying a click handler, `<a>` over a `<span>` carrying one.
|
|
39
|
+
- A `<div>` with a click handler requires a role, a tab index, and keyboard handlers. Use `<button>` instead.
|
|
40
|
+
- Spell an attribute the way the file's syntax spells it: `onclick` and `tabindex` in HTML and Astro markup, `onClick` and `tabIndex` in JSX.
|
|
39
41
|
- Set role on custom controls: `role="combobox"`, `role="listbox"`, `role="menu"`, `role="option"`.
|
|
40
42
|
- Synchronize state attributes with visual state: `aria-expanded`, `aria-selected`, `aria-checked`, `aria-disabled`.
|
|
41
43
|
- Add `aria-label` or `aria-labelledby` to interactive elements with no visible text label.
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: Form validation timing, save-blocking, and derived state for
|
|
2
|
+
description: Form validation timing, save-blocking, and derived state for rendered forms
|
|
3
3
|
paths:
|
|
4
4
|
- '**/*.tsx'
|
|
5
5
|
- '**/*.jsx'
|
|
6
|
+
- '**/*.astro'
|
|
6
7
|
---
|
|
7
8
|
|
|
8
9
|
# Form standards
|