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

v2 solution for #35189 #1

Merged
merged 1 commit into from
Apr 29, 2024
Merged

v2 solution for #35189 #1

merged 1 commit into from
Apr 29, 2024

Conversation

MHLut
Copy link
Owner

@MHLut MHLut commented Apr 29, 2024

This is an alternative for django#17910, with a UI that looks more like the original Django.

Accessibility notes

I discussed this solution with a blind developer. He suggested we replace <fieldset> with <div role="group"> if the lack of <legend> bothers the accessibility checkers.

Due to styling issues, I had to change the heading level of inline fieldsets to <h4>. This also fixes a heading bug I mentioned in the original PR.

Other notes

This solution hinges on adding a unique ID to a fieldset heading so that we can use aria-labelledby on the <fieldset>. Due to the lack of a clean way of generating such an ID in the template, I added another property to the Fieldset class.

This is an alternative for django#17910, with a UI that looks more like the original Django.
@MHLut MHLut self-assigned this Apr 29, 2024
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Hello! Thank you for your contribution 💪

As it's your first contribution be sure to check out the patch review checklist.

If you're fixing a ticket from Trac make sure to set the "Has patch" flag and include a link to this PR in the ticket!

If you have any design or process questions then you can ask in the Django forum.

Welcome aboard ⛵️!

@MHLut MHLut merged commit 1d87e40 into ticket_35189 Apr 29, 2024
10 checks passed
@MHLut MHLut deleted the ticket_35189-v2 branch April 29, 2024 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant