Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@fkakatie
Copy link
Member

Description

Moving @bstopp's PR from aem-boilerplate.

Opting for an empty alt attribute here in lieu of setting role attribute to presentation based on recommendations from Web Hypertext Application Technology Working Group and the Web Accessibility
Initiative
.

The Worldwide Web Consortium provides an example for the use of role="presentation":

An image that is in a container with the img role and where the full text alternative is available and is marked up with aria-labelledby and (if needed) aria-describedby;

Where, in this instance, we don't meet that threshold without the "full text alternative" in this specific implementation.

Related Issue

#18

Motivation and Context

"The Lighthouse output results in a "Links do not have a discernible name" accessibility error which reduces the score" — @dave-fink

"By default, all icons would be purely decorative (most cases), but projects could opt-in to individually override icons they know should be descriptive either in their blocks or in the auto-blocking function." — @ramboz

How Has This Been Tested?

/test/decorate/decorateIcon.test.html

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

bstopp
bstopp previously approved these changes Dec 11, 2023
ramboz
ramboz previously approved these changes Dec 11, 2023
Copy link
Collaborator

@ramboz ramboz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me 👍

@fkakatie fkakatie dismissed stale reviews from ramboz and bstopp via 2961b11 December 11, 2023 18:11
@fkakatie fkakatie requested review from davidnuescheler and removed request for dave-fink and kptdobe December 11, 2023 18:13
@fkakatie fkakatie merged commit 51a9be3 into main Dec 13, 2023
@fkakatie fkakatie deleted the icon-alt-text branch December 13, 2023 15:30
@kptdobe
Copy link
Contributor

kptdobe commented Dec 13, 2023

🎉 This PR is included in version 1.4.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants