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

Avatar - Image Alt text Accessibility #3593

Closed
harrisonwillettbetterworks opened this issue Jan 26, 2023 · 0 comments
Closed

Avatar - Image Alt text Accessibility #3593

harrisonwillettbetterworks opened this issue Jan 26, 2023 · 0 comments
Assignees
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone

Comments

@harrisonwillettbetterworks

Describe the bug

The Avatar component has a WCAG SC 1.1.1 failure found here:

<img v-else-if="image" :src="image" @error="onError" />

When running Axe Dev Tools on an Avatar component with an image a failure of SC 1.3.1 is shown. There are a few solutions to this including adding alt text :aria-label="ariaLabel" or adding a role like role="none" or role="presentation". I can see potential issues with either option depending on the implementation in an application. You may want to provide the option to choose which is used depending on design pattern.

Proposed Fix

  • <img v-else-if="image" :alt="ariaLabel" :src="image" @error="onError" />
  • <img v-else-if="image" role="presentation" :src="image" @error="onError" />

PrimeVue version

3.22.4

Vue version

3.x

Language

TypeScript

@mertsincan mertsincan self-assigned this Jan 26, 2023
@mertsincan mertsincan added the Status: Pending Review Issue or pull request is being reviewed by Core Team label Jan 26, 2023
@mertsincan mertsincan added this to the 3.23.0 milestone Jan 26, 2023
@tugcekucukoglu tugcekucukoglu modified the milestones: 3.23.0, 3.24.0 Jan 30, 2023
@mertsincan mertsincan added Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add and removed Status: Pending Review Issue or pull request is being reviewed by Core Team labels Mar 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Projects
None yet
Development

No branches or pull requests

3 participants