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

Fixes: listitem: <li> elements must be contained in a <ul> or <ol> #13120

Merged
merged 5 commits into from
Mar 28, 2023

Conversation

gadgetfbi
Copy link
Contributor

Prerequisites

umbraco/Umbraco-CMS.Accessibility.Issues#27

Description

Moved the role and aria-selected from the buttons to the child listitem elements to conform with the expectation that tablist child elements have a role of tab. This change will apply to all of the section tab navigation items.

RobWNicolson and others added 5 commits October 5, 2022 08:36
…- moved the role and aria-selected from the button to the listitem to conform with the requirement that the parent list with a role of tablist must hacve children of a specific role
@gadgetfbi
Copy link
Contributor Author

n.b. the last 4 commits here are me trying to figure things out ;) - thanks!

@github-actions
Copy link

github-actions bot commented Oct 5, 2022

Hi there @gadgetfbi, thank you for this contribution! 👍

While we wait for one of the Core Collaborators team to have a look at your work, we wanted to let you know about that we have a checklist for some of the things we will consider during review:

  • It's clear what problem this is solving, there's a connected issue or a description of what the changes do and how to test them
  • The automated tests all pass (see "Checks" tab on this PR)
  • The level of security for this contribution is the same or improved
  • The level of performance for this contribution is the same or improved
  • Avoids creating breaking changes; note that behavioral changes might also be perceived as breaking
  • If this is a new feature, Umbraco HQ provided guidance on the implementation beforehand
  • 💡 The contribution looks original and the contributor is presumably allowed to share it

Don't worry if you got something wrong. We like to think of a pull request as the start of a conversation, we're happy to provide guidance on improving your contribution.

If you realize that you might want to make some changes then you can do that by adding new commits to the branch you created for this work and pushing new commits. They should then automatically show up as updates to this pull request.

Thanks, from your friendly Umbraco GitHub bot 🤖 🙂

@nul800sebastiaan
Copy link
Member

Thanks for the contribution @gadgetfbi! I had a look at the accessibility issue you linked to but I'm failing to see the relevance, that A11Y issue reports that there's not a proper <ul> or <ol> surrounding the <li> elements, but this seems to fix something else. Did you mean to link to something else?

@gadgetfbi
Copy link
Contributor Author

gadgetfbi commented Oct 5, 2022

Hi @nul800sebastiaan, thanks for looking at this.

The list items, li.umb-tab--active, are wrapped in ul's so I assumed that perhaps the issue had been confused a little by the role of tablist that has been assigned to the parent ul's. I don't see an issue with these child list items and nothing related is being flagged by Axe or Wave when running an a11y check.

I'll double check the list of accessibility issues and see if this one is actually on there.

Thanks,
Rob

@gadgetfbi
Copy link
Contributor Author

@glombek glombek self-requested a review October 19, 2022 11:07
Copy link
Contributor

@glombek glombek left a comment

Choose a reason for hiding this comment

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

Hi @gadgetfbi,

Thanks so much for your pull request.

I've just been looking into this and it functions fine (including with keyboard navigation and a screen reader). However, it does introduce us to another WCAG violation: https://dequeuniversity.com/rules/axe/4.4/nested-interactive

Although this is a lower severity than the current issue (critical to serious), it'd be nice to get this working without any WCAG issues.

I suspect the fix would be to not use a ul at all, and do something a little closer to the example here: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/tab_role#example

This would, no doubt result in a little restyling to make it look as it does currently.

Let me know if you'd like any more elaboration.

Joe

@nul800sebastiaan nul800sebastiaan changed the base branch from v10/contrib to v11/contrib October 25, 2022 12:51
@umbrabot
Copy link

Hi there @gadgetfbi!

First of all: A big #H5YR for making an Umbraco related contribution during Hacktoberfest! We are very thankful for the huge amount of PRs submitted, and all the amazing work you've been doing 🥇

Due to the amazing work you and others in the community have been doing, we've had a bit of a hard time keeping up. 😅 While all of the PRs for Hacktoberfest might not have been merged yet, you still qualify for receiving some Umbraco swag, congratulations! 🎉

In the spirit of Hacktoberfest we've prepared some exclusive Umbraco swag for all our contributors - including you!

As an alternative choice this year, you can opt-out of receiving anything and ask us to help improve the planet instead by planting a tree on your behalf. 🌳

Receive your swag or plant a tree! 👈 Please follow this link to fill out and submit the form, before December 18th, 2022, 09:00 AM UTC.

Following this date we'll be sending out all the swag, but please note that it might not reach your doorstep for a few months, so please bear with us and be patient 🙏

The only thing left to say is thank you so much for participating in Hacktoberfest! We really appreciate the help!

Kind regards,
The various Umbraco teams.

@nul800sebastiaan nul800sebastiaan changed the base branch from v11/contrib to contrib January 26, 2023 14:47
@nul800sebastiaan nul800sebastiaan changed the title Play01 Fixes: listitem: <li> elements must be contained in a <ul> or <ol> Mar 28, 2023
@nul800sebastiaan nul800sebastiaan changed the title Fixes: listitem: <li> elements must be contained in a <ul> or <ol> Fixes: listitem: <li> elements must be contained in a <ul> or <ol> Mar 28, 2023
@nul800sebastiaan
Copy link
Member

Since there's been no activity on this one for a while, let's get this one merged for now and it can be improved up later, I'll point to Joe's comment in the related issue.

Thanks again @gadgetfbi and we'd love it if you have some time to further fix things even better according to Joe's comment! 🙏

@nul800sebastiaan
Copy link
Member

nul800sebastiaan commented Mar 28, 2023

Cherry picked for 10.6 in 391bfb7

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

Successfully merging this pull request may close these issues.

5 participants