fix(FORMS-6979): Coral-Icon receives alt attribute value from wrapping Button title or icon attributes#295
Open
CristianAntoniu-Balan wants to merge 1 commit intoadobe:masterfrom
Conversation
…g Button title or icon attributes
Pareesh
reviewed
May 18, 2023
| // Accessibility fix | ||
| // If the wrapping <button> has either a "title=" or an "icon=" attribute | ||
| // passes the value down to the <coral-icon> as "alt=" | ||
| (this.title || this.icon) && (iconElement.alt = this.title || this.icon); |
Contributor
There was a problem hiding this comment.
I think this case is only valid when button itself does not have any text content in it, secondly this code can be avoided by setting iconAutoAriaLabel to Icon.autoAriaLabel.ON
There was a problem hiding this comment.
the icon attribute doesn't seem like it would ever be satisfactory alt text. Looking at the list of icons these are not suitable as alt text. Perhaps as a fallback you could space separate instead of camel case - but even then these wouldn't be localized so it would still seem like a bad idea.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Accessibility fix for
https://jira.corp.adobe.com/browse/FORMS-6979
https://jira.corp.adobe.com/browse/FORMS-7013
Description
Accessibility fix for wrapped inside a - the "title" or the "icon" attribute values of the button are passed down to the icon as "alt" attribute.
Related Issue
Accessibility fix for
https://jira.corp.adobe.com/browse/FORMS-6979
https://jira.corp.adobe.com/browse/FORMS-7013
Motivation and Context
Accessibility fix for
https://jira.corp.adobe.com/browse/FORMS-6979
https://jira.corp.adobe.com/browse/FORMS-7013
How Has This Been Tested?
Manual test.
Screenshots (if appropriate):
Types of changes
Checklist: