Skip to content
This repository was archived by the owner on Nov 24, 2020. It is now read-only.
This repository was archived by the owner on Nov 24, 2020. It is now read-only.

Accessibility: Add label to the Search Input Field #15

@nbertino

Description

@nbertino

The search input box could use a label to convey meaning to users with assistive devices.

Something like:

_layouts/website/page.html

{% block search_input %}
<div id="book-search-input" role="search">
    <label for="book-search-input-field" class="sr-only">{{ 'SEARCH_PLACEHOLDER'|t }}</label>
    <input id="book-search-input-field" type="text" placeholder="{{ 'SEARCH_PLACEHOLDER'|t }}" />
</div>
{% endblock %}

This would resolve a WCAG 2.0/AA error and make GitBook more accessible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions