Skip to content
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

HTML :enable and :disabled are not quite conformant #6

Open
SimonSapin opened this issue Apr 20, 2012 · 2 comments
Open

HTML :enable and :disabled are not quite conformant #6

SimonSapin opened this issue Apr 20, 2012 · 2 comments
Labels

Comments

@SimonSapin
Copy link
Contributor

These should match :enabled, but currently do not:

li elements that are children of menu elements, and that have a child element that defines a command, if the first such element's Disabled State facet is false (not disabled)

(Similarly for :disabled with Disabled State facet is true (disabled))

Form elements should be considered disabled

... if its disabled attribute is set, or if it is a descendant of a fieldset element whose disabled attribute is set and is not a descendant of that fieldset element's first legend element child, if any.

The last part was skipped, so the current implementation is:

... if its disabled attribute is set, or if it is a descendant of a fieldset element whose disabled attribute is set

@Gallaecio
Copy link
Member

Gallaecio commented Apr 2, 2019

Those links are currently broken. They are available in the wayback machine, though:

None of the specifications linked from the Mozilla documentation mention these cases.

Moreover, the two linked specifications which do detail what should be considered :enabled or :disabled, which are the HTML5 specification and the HTML Living Standard, seem to provide a definition that is simpler than our current implementation.

@redapple, @kmike, @dangra What should we do? Should we follow the living standard? Should we follow the HTML5 standard? Should we make it possible to select which standard to follow?

@blaise-io
Copy link

blaise-io commented Apr 18, 2019

I just ran into an issue related to this.

I was expecting <input type="hidden"> to match input:enabled, but it didn't match because of

(name(.) = 'input' and @type != 'hidden') or

cssselect's implementation does not match the spec and it also does not match the implementation in Chrome and Firefox where input:enabled does match the hidden input element.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants