Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Reviews blocks: rating has role="img" but missing aria-label #1675

Closed
Aljullu opened this issue Jan 29, 2020 · 2 comments · Fixed by #3706
Closed

Reviews blocks: rating has role="img" but missing aria-label #1675

Aljullu opened this issue Jan 29, 2020 · 2 comments · Fixed by #3706
Assignees
Labels
block-type: reviews Issues related to all of the reviews related blocks. focus: accessibility The issue/PR is related to accessibility. type: bug The issue/PR concerns a confirmed bug. type: good first issue The issue is a good candidate for the first community contribution/for a newcomer to the team.

Comments

@Aljullu
Copy link
Contributor

Aljullu commented Jan 29, 2020

Ratings shown in the reviews blocks are not accessible. They have role="img" but are missing an aria-label prop to define them:

https://github.com/woocommerce/woocommerce-gutenberg-products-block/blob/master/assets/js/base/components/review-list-item/index.js#L126

Instead of directly solving it there, I think it would make more sense to reuse the logic from atomic/components/product/rating/index.js, which was made accessible in #1656 and has exactly the same markup (only class names differ).

@Aljullu Aljullu added type: bug The issue/PR concerns a confirmed bug. focus: accessibility The issue/PR is related to accessibility. labels Jan 29, 2020
@nerrad nerrad added the block-type: reviews Issues related to all of the reviews related blocks. label Jun 7, 2020
@github-actions
Copy link
Contributor

This issue has been marked as stale because it has not seen any activity within the past 60 days. Our team uses this tool to help surface issues for review. If you are the author of the issue there's no need to comment as it will be looked at.

######Internal: After 10 days with no activity this issue will be automatically be closed.

@github-actions github-actions bot added the status: stale Stale issues and PRs have had no updates for 60 days. label Dec 17, 2020
@nerrad nerrad added type: good first issue The issue is a good candidate for the first community contribution/for a newcomer to the team. and removed status: stale Stale issues and PRs have had no updates for 60 days. labels Jan 5, 2021
@mikejolley
Copy link
Member

The markup is slightly different so we can't straight out swap the component but we can add the tag. Code has moved to here since the issue was created:

https://github.com/woocommerce/woocommerce-gutenberg-products-block/blob/f3b2b53435ffbc9ac49215846bad08ce74c7124b/assets/js/base/components/reviews/review-list-item/index.js#L122-L146

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
block-type: reviews Issues related to all of the reviews related blocks. focus: accessibility The issue/PR is related to accessibility. type: bug The issue/PR concerns a confirmed bug. type: good first issue The issue is a good candidate for the first community contribution/for a newcomer to the team.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants