Skip to content
This repository is currently being migrated. It's locked while the migration is in progress.

Commit aa1c638

Browse files
authored
Merge pull request #6153 from department-of-veterans-affairs/6101
Divider: Add accessibility notes to divider
2 parents 21df1e5 + f387eec commit aa1c638

1 file changed

Lines changed: 25 additions & 2 deletions

File tree

src/_components/divider.md

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ intro-text: "Dividers are used sparingly to separate significant sections of con
77
status: use-best-practice
88
web: true
99
mobile-app: false
10+
anchors:
11+
- anchor: Example
12+
- anchor: Usage
13+
- anchor: Accessibility considerations
1014
---
1115

1216
## Example
@@ -24,5 +28,24 @@ mobile-app: false
2428

2529
### When to consider something else
2630

27-
- Avoid using divider between short, individual items that are in close proximity with one another, _unless_ they are separating navigation links. Consider using white space or headers instead to create vertical separation.
28-
- Use a background color box or card to separate a chunk of interactive elements, like search controls, from a list of search results.
31+
* **Short items in close proximity.** Avoid using a divider between short, individual items that are close to one another, _unless_ they separate navigation links. Consider using white space or headers instead to create vertical separation.
32+
* **Grouped interactive elements.** Use a background color box or card to separate a chunk of interactive elements, like search controls, from a list of search results.
33+
34+
### How this component works
35+
36+
The Divider component creates a horizontal rule between sections of content. Use it to separate distinct groups of information when spacing or headings alone don't provide enough visual separation.
37+
38+
In most cases, dividers are decorative. If a divider communicates a meaningful change in topic or structure, don't hide it from assistive technology.
39+
## Accessibility considerations
40+
41+
### Decorative vs semantic dividers
42+
43+
Not all dividers should be announced to screen readers. Most dividers are decorative when used alongside headings or within well-structured content.
44+
45+
**Use `aria-hidden="true"` for decorative dividers when:**
46+
- The divider only provides visual separation
47+
- Content structure is already clear through headings or other markup
48+
49+
**Do not use `aria-hidden="true"` for semantic dividers when:**
50+
- The divider marks a significant topic change meaningful to non-visual users
51+
- The divider is the primary indicator of a content boundary

0 commit comments

Comments
 (0)