Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add stepUp and stepDown actions for number inputs #1029

Merged
merged 1 commit into from
Apr 5, 2024

Conversation

lukewarlow
Copy link
Collaborator

@lukewarlow lukewarlow commented Apr 5, 2024

Fixes #968

Closes #967

Definitely needs some thought with regards to aria mappings that perhaps @scottaohara could help with. But think it's a good idea to get these listed as future so we do address them.

Co-authored-by: Luke Plant <luke@lukeplant.me.uk>
@@ -311,6 +311,8 @@ Invokers, the names and exact semantics may be subject to change:
| `<*>` | `'toggleFullscreen'` | If the element is fullscreen, then exit, otherwise request to enter |
| `<*>` | `'requestFullscreen'` | Request the element to enter into 'fullscreen' mode |
| `<*>` | `'exitFullscreen'` | Request the element to exit 'fullscreen' mode |
| `<input type=number>` | `'stepUp'` | Call `.stepUp()` on the invokee |
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

stepUp and stepDown take an argument which is multiplied by the step attribute. Should invokers handle that somehow? Thinking maybe the button value attribute can be used as the argument?

We have precedence for the dialog returnValue?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it'd be best to avoid getting more complicated on things like this. The number already has a step, so the most natural argument is 1 - step by 1.

chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Apr 5, 2024
This adds a stepUp and stepDown invoke action for number inputs.

See: openui/open-ui#1029
Bug: 40284894
Change-Id: I5d8ae99e31181125f872254b6f87b1579dfd5bef
@lukewarlow lukewarlow merged commit da20e5b into openui:main Apr 5, 2024
5 checks passed
@lukewarlow lukewarlow deleted the invokers-stepper branch April 5, 2024 22:56
aarongable pushed a commit to chromium/chromium that referenced this pull request Apr 5, 2024
This adds a stepUp and stepDown invoke action for number inputs.

See: openui/open-ui#1029
Bug: 40284894
Change-Id: I5d8ae99e31181125f872254b6f87b1579dfd5bef
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5425043
Reviewed-by: Mason Freed <masonf@chromium.org>
Commit-Queue: Luke <lwarlow@igalia.com>
Cr-Commit-Position: refs/heads/main@{#1283459}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Apr 5, 2024
This adds a stepUp and stepDown invoke action for number inputs.

See: openui/open-ui#1029
Bug: 40284894
Change-Id: I5d8ae99e31181125f872254b6f87b1579dfd5bef
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5425043
Reviewed-by: Mason Freed <masonf@chromium.org>
Commit-Queue: Luke <lwarlow@igalia.com>
Cr-Commit-Position: refs/heads/main@{#1283459}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Apr 6, 2024
This adds a stepUp and stepDown invoke action for number inputs.

See: openui/open-ui#1029
Bug: 40284894
Change-Id: I5d8ae99e31181125f872254b6f87b1579dfd5bef
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5425043
Reviewed-by: Mason Freed <masonf@chromium.org>
Commit-Queue: Luke <lwarlow@igalia.com>
Cr-Commit-Position: refs/heads/main@{#1283459}
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Apr 15, 2024
…ions, a=testonly

Automatic update from web-platform-tests
Implement stepUp and stepDown invoke actions

This adds a stepUp and stepDown invoke action for number inputs.

See: openui/open-ui#1029
Bug: 40284894
Change-Id: I5d8ae99e31181125f872254b6f87b1579dfd5bef
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5425043
Reviewed-by: Mason Freed <masonf@chromium.org>
Commit-Queue: Luke <lwarlow@igalia.com>
Cr-Commit-Position: refs/heads/main@{#1283459}

--

wpt-commits: f8fb78a2c237eeb8064d2c94a2f3ac9842bd348b
wpt-pr: 45580
ErichDonGubler pushed a commit to ErichDonGubler/firefox that referenced this pull request Apr 16, 2024
…ions, a=testonly

Automatic update from web-platform-tests
Implement stepUp and stepDown invoke actions

This adds a stepUp and stepDown invoke action for number inputs.

See: openui/open-ui#1029
Bug: 40284894
Change-Id: I5d8ae99e31181125f872254b6f87b1579dfd5bef
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5425043
Reviewed-by: Mason Freed <masonf@chromium.org>
Commit-Queue: Luke <lwarlow@igalia.com>
Cr-Commit-Position: refs/heads/main@{#1283459}

--

wpt-commits: f8fb78a2c237eeb8064d2c94a2f3ac9842bd348b
wpt-pr: 45580
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[invokers] stepUp and stepDown actions for number inputs
2 participants