implement headingoffset & headingreset attributes#11086
implement headingoffset & headingreset attributes#11086zcorpan merged 47 commits intowhatwg:mainfrom
Conversation
|
thank you for working on this. aside from the comments i left in my quick review, does it make sense to explicitly call out as a note that from re-reading the issue this stems from, i'm assuming people are likely thinking that if someone declares an aria-level on a heading, the value of that attribute is what the heading level will be exposed as, yes? Or to be very clear, do people agree with the following: if HTML doesn't have a note for this, then we can get it into html aam, aria in html, or both - and i'd assume MDN author guidance. |
|
I haven't looked at the PR text itself yet, but I think such a note/example would be valuable. |
|
I've added a note mentioning |
annevk
left a comment
There was a problem hiding this comment.
Since this is not marked as draft and is still getting updates I'm going to make it extra clear that I consider #5033 (comment) to be blocking concerns.
a83d233 to
cc8c891
Compare
jakearchibald
left a comment
There was a problem hiding this comment.
Btw, I think this is great, and a much-needed addition to the platform.
source
Outdated
| boolean <span data-x="dom-togglePopover">togglePopover</span>(optional (<span>TogglePopoverOptions</span> or boolean) options = {}); | ||
| [<span>CEReactions</span>] attribute DOMString? <span data-x="dom-popover">popover</span>; | ||
|
|
||
| [<span>CEReactions</span>, <span data-x="xattr-Reflect">Reflect</span>, <span data-x="xattr-ReflectRange">ReflectRange=(0, 9)</span>] attribute unsigned long <dfn attribute for="HTMLElement" data-x="dom-headingOffset">headingOffset</span>; |
There was a problem hiding this comment.
Not both Reflect and ReflectRange. The latter implies the former.
There was a problem hiding this comment.
I cribbed from other examples such as TableColElement which has both Reflect & ReflectRange. Shall I file an issue for cleaning those up?
There was a problem hiding this comment.
Oh wait. I guess you need to leave this as-is and if this lands first, then #11518 needs to remove it. (And vice versa. :-()
|
@keithamus I just noticed you removed all the style sheet changes. While I don't think we have to change that example, I do think we have to change the user agent style sheet as part of this change. Do we have test coverage for the user agent style sheet being changed as part of this change? |
annevk
left a comment
There was a problem hiding this comment.
I'm happy with this. I'm not happy with the variant discussed on WHATWG Chat whereby dialog in its model state can end up changing heading levels. Heading levels should stay consistent regardless of the state of controls.
Add headingoffset (integer, 0-8) and headingreset (boolean) to global attributes per whatwg/html#11086 and whatwg/html#11979. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This specifies the
headingoffsetandheadingstartattributes as proposed in #5033.Closes #5033
headingoffset&headingreset. web-platform-tests/wpt#54294(See WHATWG Working Mode: Changes for more details.)
/dom.html ( diff )
/index.html ( diff )
/infrastructure.html ( diff )
/rendering.html ( diff )
/sections.html ( diff )