Make WordPress Core

Opened 18 years ago

Closed 13 years ago

#7993 closed enhancement (wontfix)

Missing tabindex argument for wp_dropdown generated inputs

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

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 16 years ago.
7993.2.diff​ (2.9 KB ) - added by wojtek.szkutnik 16 years ago.

Download all attachments as: .zip

Change History (11)

#1 @Malaiac
18 years ago

  • Type defect → enhancement

#2 @FFEMTcJ
18 years ago

  • Milestone 2.8 → Future Release

#3 @wojtek.szkutnik
16 years ago

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

wp_dropdown)user affected as well

#4 @nacin
16 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
16 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
16 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
16 years ago

Good point - fixed it in all three functions.

#8 @nacin
16 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
13 years ago

  • Milestone Future Release
  • Resolution → wontfix
  • Status new → closed
Note: See TracTickets for help on using tickets.