Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates asset alt text to use getThumbAlt #12724

Merged

Conversation

gcamacho079
Copy link
Contributor

Description

...and updates getThumbAlt for instances where the file type icons are used instead of the asset itself. This fixes instances where generic file type icons used the asset Alternative Text.

In addition, it removes the use of the asset title from the alt attribute as it’s considered a generic/irrelevant string under ATAG.

Related issues

Also resolves DEV-588

@gcamacho079 gcamacho079 requested a review from a team as a code owner February 23, 2023 00:22
@linear
Copy link

linear bot commented Feb 23, 2023

DEV-588 Images are marked as decorative if they don't have alt text set, or are given automatically-generated alt text

Page Area:

Element index pages, My Account page, asset page, user field

Issue Description:

Some images default to using Title field when there is no alt text. Others set a null alt attribute.

Action:

ATAG guidelines state that images should not have alt text if none is set, to ensure they are more easily caught by automatic checks. There should not be an alt attribute on images if they don't have the Alternative Text field set

Screenshot/Code Snippet:

N/A

Resolves CMS-205

DEV-1078 The file type image does not have alternative text that adequately describes its purpose

Page Area:

Assets index page

Issue Description:

When a text alternative is supplied via the native field, this pulls in as the alt text. This is fine for images and GIFs, where a preview is shown. However, for things like videos where only the file type graphic is shown, the alternative text should reflect the file type (i.e. MOV, MP4, etc.)

Action:

See above

Screenshot/Code Snippet:

Screenshot showing the accessible text of the mp4 graphic is actually pulling the video transcript

Screenshot 2023-01-31 at 11.56.46 AM.png

Resolves CMS-287

@gcamacho079 gcamacho079 added the accessibility 👤 features related to accessibility label Feb 28, 2023
@brandonkelly brandonkelly changed the base branch from 4.4 to 4.5 March 31, 2023 04:22
…-have

# Conflicts:
#	src/elements/Asset.php
#	src/web/assets/cp/dist/cp.js
#	src/web/assets/cp/dist/cp.js.map
…-have

# Conflicts:
#	src/web/assets/cp/dist/cp.js
#	src/web/assets/cp/dist/cp.js.map
[ci skip]
@brandonkelly brandonkelly merged commit e3cac17 into 4.5 Apr 4, 2023
@brandonkelly brandonkelly deleted the feature/dev-1078-the-file-type-image-does-not-have branch April 4, 2023 07:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility 👤 features related to accessibility
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants