Elements with Fallback, Proxy, Replacement, Substitute, or Surrogate Elements #1232
Labels
addition/proposal
New features or enhancements
needs implementer interest
Moving the issue forward requires implementers to express interest
What problem are you trying to solve?
What if DOM elements could provide fallback, proxy, replacement, substitute, or surrogate elements for themselves?
This would enable scenarios including shadow tree navigation, accessibility, internationalization, and content negotiation.
What solutions exist today?
The DOM provides means to navigate shadow trees. The approach broached here would add to the existing solution, in these regards.
Solutions exist for Web accessibility such as placing ARIA attributes on documents' elements. Creating a means for elements to provide fallback, proxy, replacement, substitute, or surrogate elements would enable accessibility surrogates, alternative elements custom-tailored for accessibility scenarios.
Solutions exist for Web internationalization such as ITS.
How would you solve it?
I would first consider adding to the
Element
interface in a manner resembling:Developers would then be able to query elements to see whether they have fallback, proxy, replacement, substitute, or surrogate elements for indicated scenarios. For examples:
I would also consider adding to the
ElementCreationOptions
dictionary for theDocument::createElement()
andDocument::createElementNS()
methods. Alternatively,Document::createProxyElement()
andDocument::createProxyElementNS()
methods could be considered.Anything else?
Accessibility surrogates for HTML elements and (nestable) custom elements could be comprised of HTML elements decorated with ARIA attributes or could be comprised of ARIA elements.
For example, a nested custom element resembling:
could provide an HTML-based accessibility surrogate resembling:
Or, for an example of what an ARIA-elements-based accessibility surrogate might resemble:
Accessibility trees and HTML document trees are already "parallel structures". ARIA elements could be "parallel structures" intended for consumption by assistive technologies.
Thank you. I look forward to discussing these ideas with you.
The text was updated successfully, but these errors were encountered: