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: content/components/banner.mdx
+15-1
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,20 @@ For general design and usage guidelines of banners, see the [flash component](/c
16
16
17
17
## Accessibility
18
18
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
+
19
33
### Known accessibility issues (GitHub staff only)
0 commit comments