Make WordPress Core

Opened 16 years ago

Closed 11 years ago

#7993 closed enhancement (wontfix)

Missing tabindex argument for wp_dropdown generated inputs

Reported by: malaiac's profile Malaiac Owned by:
Milestone: Priority: normal
Severity: minor Version: 2.7
Component: Template Keywords: gsoc has-patch
Focuses: Cc:

Description

http://codex.wordpress.org/Template_Tags/wp_dropdown_categories allows to create a select for categories.

There is no tabindex option in common arguments, which is a loss for usability.

There could be other functions affected.

Attachments (2)

7993.diff (2.1 KB) - added by wojtek.szkutnik 14 years ago.
7993.2.diff (2.9 KB) - added by wojtek.szkutnik 14 years ago.

Download all attachments as: .zip

Change History (11)

#1 @Malaiac
16 years ago

  • Type changed from defect to enhancement

#2 @FFEMTcJ
16 years ago

  • Milestone changed from 2.8 to Future Release

#3 @wojtek.szkutnik
14 years ago

  • Cc wojtek.szkutnik@… added
  • Keywords gsoc has-patch added

wp_dropdown)user affected as well

#4 @nacin
14 years ago

"which is a loss for usability" -- tabindex is generally decried as poor usability that should be used sparingly. Not to suggest that there aren't valid use cases for having the argument in wp_dropdown_*, but I'm almost -1 just because the attribute is so misused.

#5 @wojtek.szkutnik
14 years ago

Shouldn't all wp_dropdown_* functions be consistent? The current version of wp_dropdown_categories already has a tab_index argument, while my patch fixes wp_dropdown_users and wp_dropdown_pages. We should either allow tab_index everywhere or remove it from wp_dropdown_categories.

#6 @nacin
14 years ago

I don't have a problem with adding it, only I wanted to clarify that it is not a usability issue as originally stated.

Re: the patch, it doesn't look like it is properly sanitized.. The cast would only affect the comparison. Ideally it should default to false. If !== false, then absint() and use it. (0 is allowed as a tabindex value.)

#7 @wojtek.szkutnik
14 years ago

Good point - fixed it in all three functions.

#8 @nacin
14 years ago

  • Keywords usability removed

Cool. One more thing, instead of escaping quotes: As a general rule, Use single quotes for PHP strings and double quotes for HTML attributes by default, and reverse them as appropriate to use PHP variables and such.

#9 @nacin
11 years ago

  • Milestone Future Release deleted
  • Resolution set to wontfix
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.