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

Refs #35189 -- Add a unique id to admin fieldsets. #18182

Closed
wants to merge 1 commit into from

Conversation

sarahboyce
Copy link
Contributor

Trac ticket number

ticket-XXXXX

Branch description

Provide a concise overview of the issue or rationale behind the proposed changes.

Checklist

  • This PR targets the main branch.
  • The commit message is written in past tense, mentions the ticket number, and ends with a period.
  • I have checked the "Has patch" ticket flag in the Trac system.
  • I have added or updated relevant tests.
  • I have added or updated relevant docs, including release notes if applicable.
  • I have attached screenshots in both light and dark modes for any UI changes.

@sarahboyce sarahboyce added the selenium Apply to have Selenium tests run on a PR label May 20, 2024
@sarahboyce sarahboyce force-pushed the unique_id_for_fieldset branch 2 times, most recently from 41a6d95 to 660c953 Compare May 20, 2024 17:05
@@ -114,6 +116,21 @@ def __init__(
self.model_admin = model_admin
self.readonly_fields = readonly_fields

@cached_property
def id(self):
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have been thinking about the id logic for a while, I think it would be good to have this logic pulled out. This might not be perfect but if we are fixing a non-unique fieldset id, we are not having to update multiple templates
@nessita I would be interested in what you think 👍

If you like it I can also add the aria-labelledby if this PR and then the other PR will fix the headers and collapse approach

@sarahboyce sarahboyce closed this May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
selenium Apply to have Selenium tests run on a PR
Projects
None yet
1 participant