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

Fix new behavior of pa11y-ci #2399

Conversation

MewenLeHo
Copy link
Contributor

@MewenLeHo MewenLeHo commented Dec 7, 2023

Related issues

Closes #2386

Description

Aria-hidden elements must not contain focusable elements (https://dequeuniversity.com/rules/axe/4.0/aria-hidden-focus).
Even if the fieldset was disabled, all focusable fields inside it must be properly disabled too.

Motivation & Context

Fix pa11y-ci and improve accessibility of the project.

Types of change

  • Bug fix (non-breaking which fixes an issue)

Live previews

Checklist

Contribution

Accessibility

  • My change follows accessibility good practices; I have at least run axe

Design

  • (na) My change respects the design guidelines defined in Orange Design System
  • (na) My change is compatible with a responsive display

Development

  • My change follows the developer guide
  • (na) I have added JavaScript unit tests to cover my changes
  • (na) I have added SCSS unit tests to cover my changes

Documentation

  • My change introduces changes to the documentation and/or I have updated the documentation accordingly

Checklist (for Core Team only)

  • My change introduces changes to the migration guide
  • (na) My new component is well displayed in Storybook
  • (na) My new component is compatible with RTL
  • (na) Manually run BrowserStack tests
  • (na) Manually test browser compatibility with BrowserStack (Chrome >= 60, Firefox >= 60 (+ ESR), Edge, Safari >= 12, iOS Safari, Chrome & Firefox on Android)
  • Code review
  • (na) Design review
  • A11y review

After the merge

Copy link

netlify bot commented Dec 7, 2023

Deploy Preview for boosted ready!

Name Link
🔨 Latest commit 9382326
🔍 Latest deploy log https://app.netlify.com/sites/boosted/deploys/6572c436bd857a0007c20a81
😎 Deploy Preview https://deploy-preview-2399--boosted.netlify.app/docs/5.3/migration
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@julien-deramond julien-deramond self-requested a review December 8, 2023 07:22
Copy link
Contributor

@julien-deramond julien-deramond left a comment

Choose a reason for hiding this comment

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

Thanks @MewenLeHo for tackling this issue! LGTM.
I've just added a migration note for it. This PR will be double-checked by the a11y core team and good to merge 🚀

@MewenLeHo
Copy link
Contributor Author

MewenLeHo commented Dec 8, 2023

I wanted to be sure that this solution is ok before writing the migration note but ok for me.
The only weird thing is that for me we shouldn't need to do it:

disabled
If this Boolean attribute is set, all form controls that are descendants of the fieldset, are disabled, meaning they are not editable and won't be submitted along with the form. They won't receive any browsing events, like mouse clicks or focus-related events.

But it seems that pa11y-ci needs the disabled attribute to consider it properly disabled even if the inputs are already disabled according to the accessibility tree. 🤔
Maybe @Aniort will have more informations about this weird behavior...

@julien-deramond
Copy link
Contributor

Hmm OK, I thought the change was justified even without taking into account pa11y-ci which can be wrong here.
I'll let @Aniort check on his side if it is maybe an error on pa11y-ci side (so it means that we should keep the current implementation), or if this is really useful (and in this case, we'll merge this PR).
Thanks for these new elements.

@Aniort
Copy link
Contributor

Aniort commented Dec 12, 2023

according to html specifications and the result in the accessible tree, Pa11y is wrong, u don't need disabled attribut on child input of a fieldset tag disabled

@julien-deramond
Copy link
Contributor

Thanks a lot @Aniort
So let's close this PR and the corresponding issue.

@MewenLeHo
Copy link
Contributor Author

It may be worth it to submit this edge case to pa11y-ci: https://github.com/pa11y/pa11y-ci/issues

@julien-deramond
Copy link
Contributor

It may be worth it to submit this edge case to pa11y-ci: https://github.com/pa11y/pa11y-ci/issues

Yep, @MewenLeHo. We'd need to dig where it comes from exactly in the middle of all the tools: pa11y-ci, pa11y, aXe, etc.

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.

Fix new behavior of pa11y-ci 3.1.0
3 participants