Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

3.8 Use HTML Elements Correctly (wording update suggestions) #20

Open
andreadavanzo opened this issue Feb 4, 2025 · 0 comments
Open
Labels
technical Corrections, bugs, or minor omissions

Comments

@andreadavanzo
Copy link

Original text

3.8 Use HTML Elements Correctly

HTML semantics are important. They don't just play a key role in making the Web look the way it does, they have a function in accessibility, SEO, and even in sustainability. Ensuring that you markup your content correctly and avoid cluttering your markup wastefully will reduce emissions.

Success Criterion - Semantic Code
Content must be marked up semantically using the right HTML element for the right job.

Success Criterion - Optional Features
Remove optional HTML tags (which aren't required for rendering), attribute quotes, or attributes that are set to their default value.

Success Criterion - Avoid Non-standard Code
Avoid using non-standard elements or attributes.

Success Criterion - Custom Code
Only use custom elements or Web Components if you cannot utilize native HTML elements or if you need tightly regulated control over the implementation of design system components.

Proposed text

HTM semantics are important. They don't just play a key role in making the Web look the way it does, they have a function in accessibility, SEO, and even in sustainability. Ensuring that you markup your content correctly and avoid cluttering your markup wastefully will reduce emissions.

Success Criterion - Semantic Code
Content must be marked up semantically using the right HTML element for the right job.

Success Criterion - Optional Features
Remove optional HTML tags, attribute quotes, and default attributes only when they do not negatively impact functionality, accessibility, or readability. Retain them when they enhance accessibility, maintain clarity, or ensure consistent browser rendering.

Success Criterion - Avoid Non-standard Code
Avoid using non-standard elements or attributes.

Success Criterion - Prefer standard HTML over custom elements or web components
Prefer using standard HTML elements and attributes. Only use custom elements or Web Components if you cannot utilize native HTML elements or if you need tightly regulated control over the implementation of design system components. Ensure that the use of custom elements or Web Components do not negatively impact accessibility. Use appropriate ARIA attributes when necessary to convey semantic information to assistive technologies.

Reasons

1."Success Criterion - Optional Features" The original text is too strict and potentially harmful.
2. "Success Criterion - Custom Code". Custom elements or Web Components should never compromise accessibility. Developers must ensure that the custom elements behave correctly for users who rely on assistive technology.

@AlexDawsonUK AlexDawsonUK added the technical Corrections, bugs, or minor omissions label Feb 4, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
technical Corrections, bugs, or minor omissions
Projects
None yet
Development

No branches or pull requests

2 participants