-
Notifications
You must be signed in to change notification settings - Fork 2.9k
implement headingoffset & headingreset attributes #11086
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
implement headingoffset & headingreset attributes #11086
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
b679a63
to
56a59e2
Compare
Heads-up: The previews are stuck on some earlier version. |
How can I kick the build previews in OP? They don't seem to be generating. |
They're usually automatic, so something has gone wrong. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Btw, I think this is great, and a much-needed addition to the platform.
@@ -12042,6 +12043,9 @@ interface <dfn interface>HTMLElement</dfn> : <span>Element</span> { | |||
undefined <span data-x="dom-hidePopover">hidePopover</span>(); | |||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not both Reflect and ReflectRange. The latter implies the former.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. :-()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very close now I think.
@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? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
This specifies the
headingoffset
andheadingstart
attributes 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 )