w3c / w3c/webdriver

Ambiguity Regarding Sending Keys to Option Elements

Open
#1,435 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

In chapter 12. Elements, section 12.4 Interaction:
In element send keys step 8 under the case labeled:

The user agent renders element as something other than a text input control (for example an input element in the color state being presented as a colorwheel):

I would like clarification on the expected behavior of sending keys to option elements. Strictly adhering to the spec, option elements would have their value themselves changed, and I wanted to confirm if this is intended behavior as it is somewhat strange. It appears that Firefox sends keys to the value of the parent select element rather than the options element, which perhaps is more reasonable and what was intended.

If Firefox's implementation is correct, would the same apply to options with datalist element parents that connect to input elements? Here is a stock example of the scenario I am referring to if it's confusing

Any confirmation or discussion would be appreciated.

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 chapter 12, “Elements,” section 12.4, especially element send keys step 8 and its non-text-input case. Compare the specification wording with Firefox behavior for option elements under select and datalist, then clarify the intended handling in the specification, including whether the parent control receives the value.

Written by the indexing model from the issue text.

Assessment

Tech stack
html
Domain
documentation
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.