Page MenuHomePhabricator

DateInputWidget does not respect the disabled or readonly attributes
Closed, ResolvedPublic

Description

Even if disabled or readonly is set on the input, the date picker can still be interacted with. It should respect the disabled/readonly state of the input.

image.png (312×337 px, 18 KB)

image.png (307×327 px, 17 KB)

The readonly input should also probably be styled to reflect that state.

image.png (168×752 px, 10 KB)

Event Timeline

STran renamed this task from DateInputWidget does not respect the disabled attribute to DateInputWidget does not respect the disabled or readonly attributes.Feb 2 2021, 3:39 PM
STran updated the task description. (Show Details)

Change 661289 had a related patch set uploaded (by STran; owner: STran):
[mediawiki/core@master] Implement disabled/readonly states to DateInputWidget

https://gerrit.wikimedia.org/r/661289

Change 661289 merged by jenkins-bot:
[mediawiki/core@master] Implement disabled/readonly states for DateInputWidget

https://gerrit.wikimedia.org/r/661289

When editing a pre-existing election, the date <input> now has the attributes aria-disabled="true" and disabled="", and cannot be interacted with (either with or without JS).

Test environment: https://vote.wikimedia.beta.wmflabs.org SecurePoll 2.0.0 (0ef20d9) 07:52, 12 February 2021.