#59768 closed defect (bug) (fixed)
Replace `tabindex` example in submit button function docs
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 6.5 | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | Administration | Keywords: | good-first-bug has-patch |
| Focuses: | accessibility, docs | Cc: |
Description
[21311] removed positive tabindex values from the submit_button() and get_submit_button() functions, but tabindex="1" is still the example for $other_attributes in their documentation.
Attachments (1)
Change History (9)
This ticket was mentioned in PR #5605 on WordPress/wordpress-develop by @benjaminknox.
2 years ago
#3
- Keywords has-patch added; needs-patch removed
Updates the docs on submit_button and get_submit_button function to match the general implementation used in wordpress. In ticket https://core.trac.wordpress.org/changeset/21311 the usage of tabindex="1" was removed and it was suggested that another example be used. This PR switches the docs to use the id attribute as an example instead.
Trac ticket: [](https://core.trac.wordpress.org/ticket/59768)
#4
@
2 years ago
I chose to use the id attribute as an example, I think it is a pretty good example for the button considering it would be set by developers pretty often.
#6
@
2 years ago
The ID should be a good choice. I have a small concern that a developer might use exactly the same ID in a plugin, but Core's search-submit example is probably better than imagining a hypothetical example.
@SergeyBiryukov commented on PR #5605:
2 years ago
#8
Thanks for the PR! Merged in r57114.
Core uses
id,disabled,aria-describedbyand/ordata-wp-listsfor some of its submit buttons. Or there might be a better option.