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

Add subContentId as attribute to interaction div #331

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

skills-up
Copy link

Allows uniquely accessing the interaction via JS and CSS

@otacke
Copy link
Contributor

otacke commented Aug 15, 2024

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
Author

I've actually followed already included aria-label convention

@otacke
Copy link
Contributor

otacke commented Aug 15, 2024

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
Author

Added the prefix, as required.

@otacke
Copy link
Contributor

otacke commented Aug 15, 2024

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

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.

2 participants