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
Copy file name to clipboardExpand all lines: .cursor/rules/studio-ui.mdc
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -42,6 +42,7 @@ We use Tailwind for styling.
42
42
- 'text-warning' for calling out information that needs action
43
43
- 'text-destructive' for calling out when something went wrong
44
44
- When needing to apply typography styles, read @apps/studio/styles/typography.scss and use one of the available classes instead of hard coding classes e.g. use "heading-default" instead of "text-sm font-medium"
45
+
- When applying focus styles for keyboard navigation, read @apps/studio/styles/focus.scss for any appropriate classes for consistency with other focus styles
Accessibility is about making an interface work for as many people as possible across as many circumstances as possible. All of us lean on affordances that accessible experiences provide:
7
+
8
+
- Keyboard navigation
9
+
- Legible and resizable elements
10
+
- Large tap targets
11
+
- Clear and simple language
12
+
13
+
## Checklist
14
+
15
+
About to push some code? At a minimum, check your work against this list:
16
+
17
+
- Are interactive page elements [keyboard-focusable](#focus-management)?
18
+
- Are all elements announcable by a [screen reader](#screen-reader-support)?
19
+
- Are textual elements legible and scalable?
20
+
- Can I use this on a smaller and/or older device?
21
+
22
+
## Focus management
23
+
24
+
All interactive page elements should be reachable by keyboard. They should also provide visual feedback upon selection via a `focus-visible` state. We use consistent focus styles such as `inset-focus` so users recognize this state instantly.
<span className="sr-only">Go to bucket details</span>
34
+
</button>
35
+
</TableCell>
36
+
```
37
+
38
+
Consider also affordances like `ctrl` and `meta` key support for opening in a new tab. Anything that you can do with a mouse input should be replicable by keyboard.
39
+
40
+
## Screen reader support
41
+
42
+
Textual elements are supported out-of-the-box by screen readers. Imagery of course should be described by `alt` tags.
43
+
44
+
Less obvious however are scaffolding elements that only makes sense visually, when paired with other content. For example: a table column for actions may not have a visual _Actions_ label because its purpose is obvious to a sighted person. For everyone else’s sake, this column should be titled with `sr-only` text:
0 commit comments