Skip to content

Commit e2787ef

Browse files
committed
Adds a11y info to Banner component
1 parent 89dea3f commit e2787ef

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

content/components/banner.mdx

+15-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,20 @@ For general design and usage guidelines of banners, see the [flash component](/c
1616

1717
## Accessibility
1818

19+
### Focus management vs. a live region
20+
21+
There was [extensive research](https://github.com/github/accessibility/blob/main/docs/coaching-recommendations/toast-flash-banner/accessible-banner-prototype.md#engineering-explorations-of-an-accessible-banner) done to determine how best to surface banners in the most accessible way. The answer is, it depends! You can reference the [accessible banner prototype docs](https://github.com/github/accessibility/blob/main/docs/coaching-recommendations/toast-flash-banner/accessible-banner-prototype.md#engineering-explorations-of-an-accessible-banner) for a very detailed explanation of scenarios tested.
22+
23+
When deciding whether to focus a banner or use a live region, consider the following:
24+
25+
* The criticality of the information - critical information (such as an error) should be as discoverable as possible
26+
* Where is a user's focus when the banner appears; would focus otherwise be lost if the banner is not focused?
27+
* Is there already a live region on the page that can be utilized? [Dynamic live regions can have some challenges](https://github.com/github/accessibility/blob/main/docs/coaching-recommendations/toast-flash-banner/accessible-banner-prototype.md#challenges-with-dynamically-inserted-live-region), so this method requires ample testing.
28+
29+
If you decide focusing the banner is the approach to go with, follow the [accessibility guidance in the Rails docs](https://primer.style/components/banner/rails/alpha#accessibility).
30+
31+
Please reach out to the accessibility team if you need help determining the best approach for your use case!
32+
1933
### Known accessibility issues (GitHub staff only)
2034

21-
<AccessibilityLink label="Banner"/>
35+
<AccessibilityLink label="Banner"/>

0 commit comments

Comments
 (0)