fix: Axe DevTools Critical Issues #20
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Details
Use to axe DevTools to resolve critical accessibility issues.
Buttons must have discernible text
Added identifiable text to the clipboard button (679ddc5).
At first I tried to solve this using
aria-label
, but@shopify/jsx-no-hardcoded-content
rule didn't allow me to override it, so I modified it to include the text and make itsr-only
readable.Images must have alternate text
Added information about what this img is by adding the title attribute (b09f4af).
Normally, it would be a good idea to add an
alt
attribute, but since this is an image generator, the meaning of the image will also change each time it is generated.This critical issue was resolved by using the title attribute instead of the
alt
attribute, referring to the Living Standard's Images whose contents are not known section.A better thing to do would have been to describe the image in
<figcaption>
, but that would have changed the look of the site, so I didn't go that far to fix it.Results