-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
👌 IMPROVE: Add
link-alt
to fix card link accessibility (#89)
This PR adds the `link-alt` option to `card` (and `grid-item-card`) directives, in order to assign a discernable name to the link (for screen readers). As noted in #78, it may be ideal to add `aria-label/`aria-hidden` to the actual link `<a>` HTML element. However, this would entail having to override aspects of the sphinx HTML builder. Instead, we include the link alt text, but add a `sd-hide-link-text` CSS class, to set `font-size: 0`, to hide the text. This solution was taken from https://stackoverflow.com/questions/471510/hide-text-using-css, and seemed to be the simplest solution. fixes #78
- Loading branch information
1 parent
f309aee
commit adbcdf2
Showing
5 changed files
with
25 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -88,3 +88,7 @@ | |
z-index: 1; | ||
content: ""; | ||
} | ||
|
||
.sd-hide-link-text { | ||
font-size: 0; | ||
} |