w3c / w3c/webdriver

Checking if an option is disabled does not consider if itself is disabled

Open
#1,917 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Element Click Is Element Enabled
Dominant language
HTML
Stars
718
Forks
228
PR merge metrics
No merged PRs in 30d

Description

based on https://w3c.github.io/webdriver/#dfn-disabled

An element element is disabled if the following steps return true:

  1. If element is an option element or element is an optgroup element:

    1. For each inclusive ancestor ancestor of element:

      1. If ancestor is an optgroup element or ancestor is a select element, and ancestor is actually disabled, return true.
    2. Return false.

  2. Return element is actually disabled.

If element is an option element, we will check its inclusive ancestor that are either optgroup or select element. That means it will not checked if the element itself is disabled (since option is not optgroup nor select element).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the disabled-element definition in the WebDriver specification linked in the issue, focusing on the algorithm for option, optgroup, and select elements. Confirm how an option that is itself disabled should be handled, then update the specification text so the definition covers that case and verify the resulting algorithm is internally consistent.

Written by the indexing model from the issue text.

Assessment

Tech stack
html
Domain
documentation
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.