Skip to content

Fix reflected element reference scope#40346

Merged
sideshowbarker merged 3 commits intomdn:mainfrom
hamishwillee:aria_reflected_element_references_scope
Jul 15, 2025
Merged

Fix reflected element reference scope#40346
sideshowbarker merged 3 commits intomdn:mainfrom
hamishwillee:aria_reflected_element_references_scope

Conversation

@hamishwillee
Copy link
Copy Markdown
Collaborator

Fixes #40294

The original doc stated that element references could target elements in parent but not nested scopes. That is true only for reflected element references - for attribute element references (i.e. in HTML) you can only reference elements in the same scope, because IDs are only valid in the scope in which they are declared.

I've split this out into two sections covering the scopes.

@jcsteh - Can you please sanity check the changes?

@hamishwillee hamishwillee requested a review from a team as a code owner July 14, 2025 04:52
@hamishwillee hamishwillee requested review from sideshowbarker and removed request for a team July 14, 2025 04:52
@github-actions github-actions bot added Content:WebAPI Web API docs size/m [PR only] 51-500 LoC changed labels Jul 14, 2025
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jul 14, 2025

Preview URLs

Flaws (2)

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

(comment last updated: 2025-07-15 07:50:31)

Copy link
Copy Markdown
Contributor

@jcsteh jcsteh left a comment

Choose a reason for hiding this comment

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

Thanks.

Comment thread files/en-us/web/api/document_object_model/reflected_attributes/index.md Outdated
Comment thread files/en-us/web/api/document_object_model/reflected_attributes/index.md Outdated
Comment thread files/en-us/web/api/document_object_model/reflected_attributes/index.md Outdated
Comment thread files/en-us/web/api/document_object_model/reflected_attributes/index.md Outdated
Comment thread files/en-us/web/api/document_object_model/reflected_attributes/index.md Outdated
@hamishwillee hamishwillee force-pushed the aria_reflected_element_references_scope branch from 2d58264 to dc096d3 Compare July 15, 2025 07:48
@hamishwillee
Copy link
Copy Markdown
Collaborator Author

@sideshowbarker This should now be good for an editorial review. Thanks so much @jcsteh for taking the time to help me fix this.

@sideshowbarker sideshowbarker merged commit 15caf9d into mdn:main Jul 15, 2025
8 checks passed
@hamishwillee hamishwillee deleted the aria_reflected_element_references_scope branch July 15, 2025 23:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:WebAPI Web API docs size/m [PR only] 51-500 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error in Attribute Reflection

4 participants