#59768 closed defect (bug) (fixed)
Replace `tabindex` example in submit button function docs
| Reported by: | sabernhardt | Owned by: | SergeyBiryukov |
|---|---|---|---|
| Priority: | normal | Milestone: | 6.5 |
| Component: | Administration | Version: | |
| Severity: | normal | Keywords: | good-first-bug has-patch |
| Cc: | Focuses: | accessibility, docs |
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.
3 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
@
3 years ago
In https://github.com/WordPress/wordpress-develop/pull/5605 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
@
3 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:
3 years ago
#8
Thanks for the PR! Merged in r57114.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Core uses
id,disabled,aria-describedbyand/ordata-wp-listsfor some of its submit buttons. Or there might be a better option.