• Resolved Chris Barrett

    (@cbarrett123)


    The WordPress search form has name="s" value associated with the built in search system. As this is also used by the built in Search widget, I assume in the core somewhere is a $_GET['s'] statement. I had an user point out under WAI (Web Accessibility Initiative), form name values are to have human usable values. Therefore, the request was to change name="s" to name="Search". Of course, such a change would involve changing to $_GET['Search'] for the WordPress core search.

    Is this something that can be changed via Filter or Action Hook?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator bcworkz

    (@bcworkz)

    You could use ‘pre_get_posts’ action to assign any ‘search’ parameters to the ‘s’ query var.

    You might also consider searching Trac to see if anyone has brought this up, and if not, post it as a possible enhancement. See Reporting Bugs. Even though it’s not really a bug, enhancement suggestions are accepted.

    Can you provide a citation to where the Web Content Accessibility Guidelines indicates that name attributes in forms should be human readable?

    Thread Starter Chris Barrett

    (@cbarrett123)

    Hi Joe,

    Thanks for the push. This maybe a misunderstanding on the developer’s part of what “name” refers to. https://www.w3.org/TR/2008/REC-WCAG20-20081211/#namedef

    Name
    Text by which software can identify a component within Web content to the user
    Note 1: The name may be hidden and only exposed by assistive technology, whereas a label is presented to all users. In many (but not all) cases, the label and the name are the same.
    Note 2: This is unrelated to the name attribute in HTML.

    Based on Note 2, I think it’s a mute point. I’m marking this as resolved.

    Cheers!
    Chris

    Great. That was my guess, as well; otherwise, this would have been a big surprise to me!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Search – name="s" change to name="Search"’ is closed to new replies.