Repository navigation
Conversation
commit: |
| } | ||
| } | ||
|
|
||
| export class DisableableElement extends HTMLElement { |
There was a problem hiding this comment.
Should we add aria-disabled support now or are we planning on doing a separate accessibility tree pass?
There was a problem hiding this comment.
Hmmm, lemme see how hard it would be to add now....
| } | ||
| } | ||
|
|
||
| export class DisableableElement extends HTMLElement { |
There was a problem hiding this comment.
Curious why we're not using a Disablable mixin like Focusable!
There was a problem hiding this comment.
It's so that we could make an instanceof check in the isFocusable() method. I wanted to make this a mixing, but couldn't quite figure it out.
We could have a hidden Symbol.for('@bomb.sh/ui/disablable') that marks the prototype of the mixin instead?
There was a problem hiding this comment.
Looks like mixin(HTMLElement, [Disableable, Focusable]) produces this
declare const HTMLButtonElement_base: typeof HTMLElement & Constructor<Disableable> & Constructor<Focusable>;
export declare class HTMLButtonElement extends HTMLButtonElement_base {}
so everything is fully resolved at compile-time!
66f0ab1 to
1f5e3a1
Compare
1f5e3a1 to
85b0415
Compare
|
no stacks on stacks |
What does this PR do?
Add initial HTML focusability checks to HTMLElement.focus(), using element defaults, tabIndex, link destinations, disabled and inert state, summary placement, and editable content. Register the corresponding HTML element classes in the document factory.
Add boolean
disabledreflection on buttons, inputs, selects, textareas, fieldsets, options, and option groups.Follow-ups remain for disabled-fieldset legend exceptions and descendants, invalid
tabindexdefaults, summary placement, and empty or case-insensitivecontenteditablevalues. SVG focus support remains deferred.Type of change
Checklist
AI-generated code disclosure