Make WordPress Core

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#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)

5605.diff (2.6 KB ) - added by fushar 3 years ago.

Download all attachments as: .zip

Change History (9)

#1 @sabernhardt
3 years ago

Core uses id, disabled, aria-describedby and/or data-wp-lists for some of its submit buttons. Or there might be a better option.

#2 @SergeyBiryukov
3 years ago

  • Keywords good-first-bug added
  • Milestone Awaiting Review6.5

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 @benjaminknox
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.

Last edited 3 years ago by benjaminknox (previous) (diff)

@fushar
3 years ago

#5 @SergeyBiryukov
3 years ago

  • Owner set to SergeyBiryukov
  • Status newreviewing

#6 @sabernhardt
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.

Last edited 3 years ago by sabernhardt (previous) (diff)

#7 @SergeyBiryukov
3 years ago

  • Resolutionfixed
  • Status reviewingclosed

In 57114:

Docs: Replace tabindex example in submit button functions documentation.

Most of the tabindex attributes across the admin were removed in [21311].

This commit updates the example for the $other_attributes parameter to use the id attribute instead.

Includes synchronizing documentation between submit_button() and get_submit_button().

Follow-up to [15810], [16061], [21311], [27136], [31599].

Props benjaminknox, sabernhardt, fushar, SergeyBiryukov.
Fixes #59768.

@SergeyBiryukov commented on PR #5605:


3 years ago
#8

Thanks for the PR! Merged in r57114.

Note: See TracTickets for help on using tickets.