Open SimonSapin opened 12 years ago
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?
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 https://github.com/scrapy/cssselect/blob/cb7a7e21de1ba9347d58a6a14b7c78b3de1f49ca/cssselect/xpath.py#L755
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.
These should match
:enabled
, but currently do not:(Similarly for
:disabled
with Disabled State facet is true (disabled))Form elements should be considered disabled
The last part was skipped, so the current implementation is: