File tree Expand file tree Collapse file tree 1 file changed +49
-0
lines changed Expand file tree Collapse file tree 1 file changed +49
-0
lines changed Original file line number Diff line number Diff line change @@ -402,3 +402,52 @@ The `.rounded-sm` and `.rounded-lg` classes have been replaced with `.rounded-1`
402402```
403403
404404</ValidExample>
405+
406+ ### Screen reader utilities
407+
408+ "Screen reader" classes are now "visually hidden" classes.
409+
410+ - Renamed `.sr-only` and `.sr-only-focusable` to `.visually-hidden` and `.visually-hidden-focusable` .
411+ - Renamed `sr-only()` and `sr-only-focusable()` mixins to `visually-hidden()` and `visually-hidden-focusable()`.
412+
413+ <InvalidExample title="Don't">
414+
415+ ```html
416+ <span class="sr-only sr-only-focusable ">
417+ Visually hidden text
418+ </span >
419+ ```
420+
421+ </InvalidExample>
422+
423+ <ValidExample title="Do">
424+
425+ ```html
426+ <span class="visually-hidden visually-hidden-focusable ">
427+ Visually hidden text
428+ </span >
429+ ```
430+
431+ </ValidExample>
432+
433+ <InvalidExample title="Don't">
434+
435+ ```scss
436+ .my-hidden-text {
437+ @include sr-only ();
438+ @include sr-only-focusable ();
439+ }
440+ ```
441+
442+ </InvalidExample>
443+
444+ <ValidExample title="Do">
445+
446+ ```scss
447+ .my-hidden-text {
448+ @include visually-hidden ();
449+ @include visually-hidden-focusable ();
450+ }
451+ ```
452+
453+ </ValidExample>
You can’t perform that action at this time.
0 commit comments