Skip to content

Add subContentId as attribute to interaction div - #331

Open
skills-up wants to merge 4 commits into
h5p:masterfrom
skills-up:patch-1
Open

Add subContentId as attribute to interaction div#331
skills-up wants to merge 4 commits into
h5p:masterfrom
skills-up:patch-1

Conversation

@skills-up

Copy link
Copy Markdown

Allows uniquely accessing the interaction via JS and CSS

@otacke

otacke commented Aug 15, 2024

Copy link
Copy Markdown
Contributor

If you add custom attributes to HTML elements, you should follow the data-* syntax for that purpose, please cmp. https://developer.mozilla.org/en-US/docs/Learn/HTML/Howto/Use_data_attributes

@skills-up

Copy link
Copy Markdown
Author

I've actually followed already included aria-label convention

@otacke

otacke commented Aug 15, 2024

Copy link
Copy Markdown
Contributor

I am not sure if I understand what you are referring to. aria-label is an inherent attribute of HTML DOM elements. sub-content-id is not and should be using the data- prefix reserved for custom attributes.

@skills-up

Copy link
Copy Markdown
Author

Added the prefix, as required.

@otacke

otacke commented Aug 15, 2024

Copy link
Copy Markdown
Contributor

I didn't say it was required, but that one should do it that was as it is recommended. I am not part of the H5P core team anyway, so feel free to ignore me :-D

@otacke otacke moved this from Backlog to Verified by Community Maintainer in H5P Open Source Project Aug 7, 2026
@otacke otacke added the enhancement A technical enhancement to improve e.g. performance or Dev QoL label Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement A technical enhancement to improve e.g. performance or Dev QoL

Projects

Status: Verified by Community Maintainer

Development

Successfully merging this pull request may close these issues.

2 participants