Skip to content

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

Description

@andreadavanzo

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

technicalCorrections, bugs, or minor omissions

Type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions