Skip to content

Conversation

Elchi3
Copy link
Member

@Elchi3 Elchi3 commented Jul 15, 2025

Description

In HTML everything is case-insensitive including enumerated attributes and their values.

Motivation

Estelle motivates me.

Additional details

See step 2. in https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#enumerated-attribute

Related issues and pull requests

#40260 (comment)

@Elchi3 Elchi3 requested a review from a team as a code owner July 15, 2025 13:25
@Elchi3 Elchi3 requested review from hamishwillee and removed request for a team July 15, 2025 13:25
@github-actions github-actions bot added Content:Glossary Glossary entries size/xs [PR only] 0-5 LoC changed labels Jul 15, 2025
Copy link
Contributor

github-actions bot commented Jul 15, 2025

Preview URLs

Flaws (2)

Note! 1 document with no flaws that don't need to be listed. 🎉

URL: /en-US/docs/Web/API/Document_Object_Model/Reflected_attributes
Title: Attribute reflection
Flaw count: 2

  • macros:
    • Macro produces link /en-US/docs/Web/API/Document_Object_Model/Events which is a redirect
    • Macro produces link /en-US/docs/Web/API/Document_Object_Model/Whitespace_in_the_DOM which is a redirect
External URLs (2)

URL: /en-US/docs/Glossary/Enumerated
Title: Enumerated


URL: /en-US/docs/Web/API/Document_Object_Model/Reflected_attributes
Title: Attribute reflection

(comment last updated: 2025-07-17 08:22:31)

@Josh-Cena
Copy link
Member

Shall we mention that their IDL-reflected properties always return the lowercase variant, given that was what the original comment was interested in?

@Elchi3
Copy link
Member Author

Elchi3 commented Jul 15, 2025

Shall we mention that their IDL-reflected properties always return the lowercase variant, given that was what the original comment was interested in?

Added but talked about "canonical values per specification" as I didn't find spec text that says that enumerated values will always return lowercased via IDL reflection. Did you see that?

@Josh-Cena
Copy link
Member

I think that's just by convention. You are right that technically it can be specified to be something else

@Elchi3 Elchi3 requested a review from a team as a code owner July 16, 2025 09:00
@Elchi3 Elchi3 requested review from wbamberg and removed request for a team July 16, 2025 09:00
@github-actions github-actions bot added Content:WebAPI Web API docs size/s [PR only] 6-50 LoC changed and removed size/xs [PR only] 0-5 LoC changed labels Jul 16, 2025
Copy link
Collaborator

@hamishwillee hamishwillee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Elchi3 Elchi3 merged commit 1d5f6ed into mdn:main Jul 17, 2025
8 checks passed
@Elchi3 Elchi3 deleted the html-is-case-insensitive branch July 17, 2025 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:Glossary Glossary entries Content:WebAPI Web API docs size/s [PR only] 6-50 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants