WICG / inert

Polyfill for the inert attribute and property.
Other
928 stars 81 forks source link

Use `:disabled` instead of `[disabled]`, check for `contenteditable="false"`? #83

Open tigt opened 6 years ago

tigt commented 6 years ago

CSS has the :disabled pseudo-class, since elements that are children of <fieldset disabled> act as if they had the attribute set themselves.

That would change the _focusableElementsString to look more like input:not(:disabled).

Similarly, contenteditable="false" actually means something, because contenteditable isn't a boolean variable, just confusingly similar to one. When set to false, it's not focusable. That would probably change its selector to [contenteditable]:not([contenteditable="true" i]).

robdodson commented 6 years ago

Ok we can look into these. Sorry for the delay. Currently on vacation 😎

On Wed, Jan 3, 2018, 8:38 PM Taylor Hunt notifications@github.com wrote:

CSS has the :disabled pseudo-class https://developer.mozilla.org/en-US/docs/Web/CSS/:disabled, since elements that are children of

act as if they had the attribute set themselves.

That would change the _focusableElementsString to look more like input:not(:disabled).

Similarly, contenteditable="false" actually means something, because contenteditable isn't a boolean variable, just confusingly similar to one. When set to false, it's not focusable. That would probably change its selector to [contenteditable]:not([contenteditable="true" i]).

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/WICG/inert/issues/83, or mute the thread https://github.com/notifications/unsubscribe-auth/ABBFDTnTJ8jr_gm3qoyuLCGdc9ZDIENzks5tHFXTgaJpZM4RSkEG .