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

Use Element.id to get module id for accordion #2811

Merged
merged 2 commits into from
Aug 26, 2022
Merged

Conversation

36degrees
Copy link
Member

Use the native Element.id IDL property (supported by all modern browsers including IE6+) rather than Element.getAttribute('id')

As this.moduleId is only used once, replace it with a call to this.$module.id.

@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-2811 August 26, 2022 10:09 Inactive
Use the native `Element.id` IDL property (supported by all modern browsers including IE6+) rather than `Element.getAttribute('id')`

As `this.moduleId` is only used once, replace it with a call to `this.$module.id`.
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-2811 August 26, 2022 10:10 Inactive
@36degrees
Copy link
Member Author

Just to record that I've tested this in IE8 through 11 (by inspecting the button and ensuring that aria-controls is set as expected).

I've not tested in any other browsers other than Chrome 104 as my day-to-day browser.

@36degrees 36degrees merged commit 50bdf4e into main Aug 26, 2022
@36degrees 36degrees deleted the accordion-module-id branch August 26, 2022 10:47
@romaricpascal romaricpascal mentioned this pull request Nov 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants