w3c / w3c/webdriver

The clear algorithm does not work for input elements in Range or Color state

Open
#1,311 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

In chapter 14. Element Interaction:

set the value of the element to an empty string

The clear algorithm for input elements requires setting the value of the element to an empty string. However, this is not possible for input elements in Range or Color state. Both https://html.spec.whatwg.org/#range-state-(type=range) and https://html.spec.whatwg.org/#color-state-(type=color) specify that "User agents must not allow the user to set the value to the empty string."

For an input element in Range state, the clear algorithm should set its value to the default value, as given in the HTML spec. For input elements in Color state, the clear algorithm should set its value to "#000000".

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

Read the Element Interaction chapter in the WebDriver specification and the linked HTML definitions for Range and Color states. Compare the clear algorithm with those requirements, then verify that Range uses its HTML-defined default value and Color uses "#000000".

Written by the indexing model from the issue text.

Assessment

Tech stack
html
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.