Skip to content

Commit 66b47be

Browse files
authored
Add documentation on accessibility. (#113)
* Add documentation on accessibility. the-draupnir-project/planning#81.
1 parent a27e34d commit 66b47be

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

docs/contributing/accessibility.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Accessibility
2+
3+
## Render methods for `org.matrix.custom.html` (DeadDocument)
4+
5+
To render command responses to Matrix, we use a custom JSX factory from
6+
[interface-manager](https://github.com/the-draupnir-project/interface-manager)
7+
to provide us with elements from `org.matrix.custom.html` (and the DOM that
8+
facilitates this is called `DeadDocument`).
9+
10+
The general rule to keeping message content accessible is use semantic HTML
11+
elements over arbitrary ways of maintaining structure.
12+
13+
The following describes what we should be doing to improve the accessibility of
14+
message content. Pull request reviewers should check rendered messages match the
15+
recommendations in this document.
16+
17+
### Headings
18+
19+
Headings should be used at the beginning of each section within a message. This
20+
is because users of screen readers who depend on keyboard navigation need
21+
headings to properly skip over sections.
22+
23+
### Descriptive text for indicators
24+
25+
If emoji or symbols are used to show a status, then the meaning should be
26+
written explicitly. For example, the `!draupnir protections` command shows
27+
whether each command is enabled or disabled with the green circle `🟢` and red
28+
circle emoji `🔴`. But next to each we also say what these mean with `(enabled)`
29+
or `(disabled)`. This is important not only for users struggling with colour
30+
perception, but also because it can be unclear to users what the emoji means in
31+
the first place.

0 commit comments

Comments
 (0)