Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Title and accessible label for search input fields. #7261

Merged
merged 1 commit into from
Dec 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions app/lib/frontend/templates/views/shared/search_banner.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ d.Node searchBannerNode({
autocomplete: 'on',
autofocus: autofocus,
value: queryText,
attributes: {
'title': 'Search',
'aria-label': 'Search',
},
),
d.button(classes: ['icon'], ariaLabel: 'search'),
if (showSearchFiltersButton)
Expand Down
4 changes: 4 additions & 0 deletions app/lib/frontend/templates/views/shared/site_header.dart
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ d.Node siteHeaderNode({
name: 'q',
placeholder: 'New search...',
autocomplete: 'on',
attributes: {
'title': 'Search',
'aria-label': 'Search',
},
),
),
),
Expand Down
2 changes: 1 addition & 1 deletion app/test/frontend/golden/authorized_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<div class="site-header-mask"></div>
<div class="site-header-search">
<form action="/packages" method="GET">
<input class="site-header-search-input" name="q" placeholder="New search..." autocomplete="on"/>
<input class="site-header-search-input" name="q" placeholder="New search..." autocomplete="on" title="Search" aria-label="Search"/>
</form>
</div>
<div class="site-header-nav scroll-container">
Expand Down
2 changes: 1 addition & 1 deletion app/test/frontend/golden/consent_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<div class="site-header-mask"></div>
<div class="site-header-search">
<form action="/packages" method="GET">
<input class="site-header-search-input" name="q" placeholder="New search..." autocomplete="on"/>
<input class="site-header-search-input" name="q" placeholder="New search..." autocomplete="on" title="Search" aria-label="Search"/>
</form>
</div>
<div class="site-header-nav scroll-container">
Expand Down
2 changes: 1 addition & 1 deletion app/test/frontend/golden/create_publisher_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<div class="site-header-mask"></div>
<div class="site-header-search">
<form action="/packages" method="GET">
<input class="site-header-search-input" name="q" placeholder="New search..." autocomplete="on"/>
<input class="site-header-search-input" name="q" placeholder="New search..." autocomplete="on" title="Search" aria-label="Search"/>
</form>
</div>
<div class="site-header-nav scroll-container">
Expand Down
2 changes: 1 addition & 1 deletion app/test/frontend/golden/error_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ <h3 class="foldable-button">
<div class="_banner-bg">
<div class="container">
<form class="search-bar banner-item" action="/packages">
<input class="input" name="q" placeholder="Search packages" autocomplete="on" autofocus="autofocus"/>
<input class="input" name="q" placeholder="Search packages" autocomplete="on" autofocus="autofocus" title="Search" aria-label="Search"/>
<button class="icon" aria-label="search"></button>
</form>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/test/frontend/golden/help_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<div class="site-header-mask"></div>
<div class="site-header-search">
<form action="/packages" method="GET">
<input class="site-header-search-input" name="q" placeholder="New search..." autocomplete="on"/>
<input class="site-header-search-input" name="q" placeholder="New search..." autocomplete="on" title="Search" aria-label="Search"/>
</form>
</div>
<div class="site-header-nav scroll-container">
Expand Down
2 changes: 1 addition & 1 deletion app/test/frontend/golden/landing_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ <h3 class="foldable-button">
<h2 class="_visuallyhidden">pub.dev package manager</h2>
<img class="logo" src="/static/hash-%%etag%%/img/pub-dev-logo.svg" alt="" width="328" height="70" role="presentation"/>
<form class="search-bar banner-item" action="/packages">
<input class="input" name="q" placeholder="Search packages" autocomplete="on" autofocus="autofocus"/>
<input class="input" name="q" placeholder="Search packages" autocomplete="on" autofocus="autofocus" title="Search" aria-label="Search"/>
<button class="icon" aria-label="search"></button>
</form>
<p class="text">
Expand Down
2 changes: 1 addition & 1 deletion app/test/frontend/golden/my_activity_log_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<div class="site-header-mask"></div>
<div class="site-header-search">
<form action="/packages" method="GET">
<input class="site-header-search-input" name="q" placeholder="New search..." autocomplete="on"/>
<input class="site-header-search-input" name="q" placeholder="New search..." autocomplete="on" title="Search" aria-label="Search"/>
</form>
</div>
<div class="site-header-nav scroll-container">
Expand Down
2 changes: 1 addition & 1 deletion app/test/frontend/golden/my_liked_packages.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<div class="site-header-mask"></div>
<div class="site-header-search">
<form action="/packages" method="GET">
<input class="site-header-search-input" name="q" placeholder="New search..." autocomplete="on"/>
<input class="site-header-search-input" name="q" placeholder="New search..." autocomplete="on" title="Search" aria-label="Search"/>
</form>
</div>
<div class="site-header-nav scroll-container">
Expand Down
2 changes: 1 addition & 1 deletion app/test/frontend/golden/my_packages.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<div class="site-header-mask"></div>
<div class="site-header-search">
<form action="/packages" method="GET">
<input class="site-header-search-input" name="q" placeholder="New search..." autocomplete="on"/>
<input class="site-header-search-input" name="q" placeholder="New search..." autocomplete="on" title="Search" aria-label="Search"/>
</form>
</div>
<div class="site-header-nav scroll-container">
Expand Down
2 changes: 1 addition & 1 deletion app/test/frontend/golden/my_publishers.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<div class="site-header-mask"></div>
<div class="site-header-search">
<form action="/packages" method="GET">
<input class="site-header-search-input" name="q" placeholder="New search..." autocomplete="on"/>
<input class="site-header-search-input" name="q" placeholder="New search..." autocomplete="on" title="Search" aria-label="Search"/>
</form>
</div>
<div class="site-header-nav scroll-container">
Expand Down
2 changes: 1 addition & 1 deletion app/test/frontend/golden/pkg_activity_log_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<div class="site-header-mask"></div>
<div class="site-header-search">
<form action="/packages" method="GET">
<input class="site-header-search-input" name="q" placeholder="New search..." autocomplete="on"/>
<input class="site-header-search-input" name="q" placeholder="New search..." autocomplete="on" title="Search" aria-label="Search"/>
</form>
</div>
<div class="site-header-nav scroll-container">
Expand Down
2 changes: 1 addition & 1 deletion app/test/frontend/golden/pkg_admin_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<div class="site-header-mask"></div>
<div class="site-header-search">
<form action="/packages" method="GET">
<input class="site-header-search-input" name="q" placeholder="New search..." autocomplete="on"/>
<input class="site-header-search-input" name="q" placeholder="New search..." autocomplete="on" title="Search" aria-label="Search"/>
</form>
</div>
<div class="site-header-nav scroll-container">
Expand Down
2 changes: 1 addition & 1 deletion app/test/frontend/golden/pkg_changelog_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<div class="site-header-mask"></div>
<div class="site-header-search">
<form action="/packages" method="GET">
<input class="site-header-search-input" name="q" placeholder="New search..." autocomplete="on"/>
<input class="site-header-search-input" name="q" placeholder="New search..." autocomplete="on" title="Search" aria-label="Search"/>
</form>
</div>
<div class="site-header-nav scroll-container">
Expand Down
2 changes: 1 addition & 1 deletion app/test/frontend/golden/pkg_example_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<div class="site-header-mask"></div>
<div class="site-header-search">
<form action="/packages" method="GET">
<input class="site-header-search-input" name="q" placeholder="New search..." autocomplete="on"/>
<input class="site-header-search-input" name="q" placeholder="New search..." autocomplete="on" title="Search" aria-label="Search"/>
</form>
</div>
<div class="site-header-nav scroll-container">
Expand Down
2 changes: 1 addition & 1 deletion app/test/frontend/golden/pkg_index_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ <h3 class="foldable-button">
<div class="_banner-bg">
<div class="container">
<form class="search-bar banner-item" action="/packages">
<input class="input" name="q" placeholder="Search packages" autocomplete="on" value="sdk:dart"/>
<input class="input" name="q" placeholder="Search packages" autocomplete="on" value="sdk:dart" title="Search" aria-label="Search"/>
<button class="icon" aria-label="search"></button>
<div class="search-filters-btn-wrapper -active">
<img class="search-filters-btn search-filters-btn-inactive" src="/static/hash-%%etag%%/img/search-filters-inactive.svg" alt="icon to toggle the display of search filters (inactive)" width="42" height="42"/>
Expand Down
2 changes: 1 addition & 1 deletion app/test/frontend/golden/pkg_install_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<div class="site-header-mask"></div>
<div class="site-header-search">
<form action="/packages" method="GET">
<input class="site-header-search-input" name="q" placeholder="New search..." autocomplete="on"/>
<input class="site-header-search-input" name="q" placeholder="New search..." autocomplete="on" title="Search" aria-label="Search"/>
</form>
</div>
<div class="site-header-nav scroll-container">
Expand Down
2 changes: 1 addition & 1 deletion app/test/frontend/golden/pkg_score_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<div class="site-header-mask"></div>
<div class="site-header-search">
<form action="/packages" method="GET">
<input class="site-header-search-input" name="q" placeholder="New search..." autocomplete="on"/>
<input class="site-header-search-input" name="q" placeholder="New search..." autocomplete="on" title="Search" aria-label="Search"/>
</form>
</div>
<div class="site-header-nav scroll-container">
Expand Down
2 changes: 1 addition & 1 deletion app/test/frontend/golden/pkg_show_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<div class="site-header-mask"></div>
<div class="site-header-search">
<form action="/packages" method="GET">
<input class="site-header-search-input" name="q" placeholder="New search..." autocomplete="on"/>
<input class="site-header-search-input" name="q" placeholder="New search..." autocomplete="on" title="Search" aria-label="Search"/>
</form>
</div>
<div class="site-header-nav scroll-container">
Expand Down
2 changes: 1 addition & 1 deletion app/test/frontend/golden/pkg_show_page_discontinued.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<div class="site-header-mask"></div>
<div class="site-header-search">
<form action="/packages" method="GET">
<input class="site-header-search-input" name="q" placeholder="New search..." autocomplete="on"/>
<input class="site-header-search-input" name="q" placeholder="New search..." autocomplete="on" title="Search" aria-label="Search"/>
</form>
</div>
<div class="site-header-nav scroll-container">
Expand Down
2 changes: 1 addition & 1 deletion app/test/frontend/golden/pkg_show_page_flutter_plugin.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<div class="site-header-mask"></div>
<div class="site-header-search">
<form action="/packages" method="GET">
<input class="site-header-search-input" name="q" placeholder="New search..." autocomplete="on"/>
<input class="site-header-search-input" name="q" placeholder="New search..." autocomplete="on" title="Search" aria-label="Search"/>
</form>
</div>
<div class="site-header-nav scroll-container">
Expand Down
2 changes: 1 addition & 1 deletion app/test/frontend/golden/pkg_show_page_publisher.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<div class="site-header-mask"></div>
<div class="site-header-search">
<form action="/packages" method="GET">
<input class="site-header-search-input" name="q" placeholder="New search..." autocomplete="on"/>
<input class="site-header-search-input" name="q" placeholder="New search..." autocomplete="on" title="Search" aria-label="Search"/>
</form>
</div>
<div class="site-header-nav scroll-container">
Expand Down
2 changes: 1 addition & 1 deletion app/test/frontend/golden/pkg_show_page_retracted.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<div class="site-header-mask"></div>
<div class="site-header-search">
<form action="/packages" method="GET">
<input class="site-header-search-input" name="q" placeholder="New search..." autocomplete="on"/>
<input class="site-header-search-input" name="q" placeholder="New search..." autocomplete="on" title="Search" aria-label="Search"/>
</form>
</div>
<div class="site-header-nav scroll-container">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<div class="site-header-mask"></div>
<div class="site-header-search">
<form action="/packages" method="GET">
<input class="site-header-search-input" name="q" placeholder="New search..." autocomplete="on"/>
<input class="site-header-search-input" name="q" placeholder="New search..." autocomplete="on" title="Search" aria-label="Search"/>
</form>
</div>
<div class="site-header-nav scroll-container">
Expand Down
2 changes: 1 addition & 1 deletion app/test/frontend/golden/pkg_show_version_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<div class="site-header-mask"></div>
<div class="site-header-search">
<form action="/packages" method="GET">
<input class="site-header-search-input" name="q" placeholder="New search..." autocomplete="on"/>
<input class="site-header-search-input" name="q" placeholder="New search..." autocomplete="on" title="Search" aria-label="Search"/>
</form>
</div>
<div class="site-header-nav scroll-container">
Expand Down
2 changes: 1 addition & 1 deletion app/test/frontend/golden/pkg_versions_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<div class="site-header-mask"></div>
<div class="site-header-search">
<form action="/packages" method="GET">
<input class="site-header-search-input" name="q" placeholder="New search..." autocomplete="on"/>
<input class="site-header-search-input" name="q" placeholder="New search..." autocomplete="on" title="Search" aria-label="Search"/>
</form>
</div>
<div class="site-header-nav scroll-container">
Expand Down
2 changes: 1 addition & 1 deletion app/test/frontend/golden/publisher_activity_log_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ <h3 class="foldable-button">
<div class="_banner-bg">
<div class="container">
<form class="search-bar banner-item" action="/packages">
<input class="input" name="q" placeholder="Search packages" autocomplete="on" autofocus="autofocus"/>
<input class="input" name="q" placeholder="Search packages" autocomplete="on" autofocus="autofocus" title="Search" aria-label="Search"/>
<button class="icon" aria-label="search"></button>
</form>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/test/frontend/golden/publisher_admin_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ <h3 class="foldable-button">
<div class="_banner-bg">
<div class="container">
<form class="search-bar banner-item" action="/packages">
<input class="input" name="q" placeholder="Search packages" autocomplete="on" autofocus="autofocus"/>
<input class="input" name="q" placeholder="Search packages" autocomplete="on" autofocus="autofocus" title="Search" aria-label="Search"/>
<button class="icon" aria-label="search"></button>
</form>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/test/frontend/golden/publisher_list_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ <h3 class="foldable-button">
<div class="_banner-bg">
<div class="container">
<form class="search-bar banner-item" action="/packages">
<input class="input" name="q" placeholder="Search packages" autocomplete="on" autofocus="autofocus"/>
<input class="input" name="q" placeholder="Search packages" autocomplete="on" autofocus="autofocus" title="Search" aria-label="Search"/>
<button class="icon" aria-label="search"></button>
<div class="search-filters-btn-wrapper">
<img class="search-filters-btn search-filters-btn-inactive" src="/static/hash-%%etag%%/img/search-filters-inactive.svg" alt="icon to toggle the display of search filters (inactive)" width="42" height="42"/>
Expand Down
2 changes: 1 addition & 1 deletion app/test/frontend/golden/publisher_packages_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ <h3 class="foldable-button">
<div class="_banner-bg">
<div class="container">
<form class="search-bar banner-item" action="/packages">
<input class="input" name="q" placeholder="Search packages" autocomplete="on" autofocus="autofocus"/>
<input class="input" name="q" placeholder="Search packages" autocomplete="on" autofocus="autofocus" title="Search" aria-label="Search"/>
<button class="icon" aria-label="search"></button>
</form>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ <h3 class="foldable-button">
<div class="_banner-bg">
<div class="container">
<form class="search-bar banner-item" action="/packages">
<input class="input" name="q" placeholder="Search packages" autocomplete="on" autofocus="autofocus"/>
<input class="input" name="q" placeholder="Search packages" autocomplete="on" autofocus="autofocus" title="Search" aria-label="Search"/>
<button class="icon" aria-label="search"></button>
</form>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/test/frontend/golden/search_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ <h3 class="foldable-button">
<div class="_banner-bg">
<div class="container">
<form class="search-bar banner-item" action="/packages">
<input class="input" name="q" placeholder="Search packages" autocomplete="on" value="foobar"/>
<input class="input" name="q" placeholder="Search packages" autocomplete="on" value="foobar" title="Search" aria-label="Search"/>
<button class="icon" aria-label="search"></button>
<div class="search-filters-btn-wrapper">
<img class="search-filters-btn search-filters-btn-inactive" src="/static/hash-%%etag%%/img/search-filters-inactive.svg" alt="icon to toggle the display of search filters (inactive)" width="42" height="42"/>
Expand Down
2 changes: 1 addition & 1 deletion app/test/frontend/golden/topics_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<div class="site-header-mask"></div>
<div class="site-header-search">
<form action="/packages" method="GET">
<input class="site-header-search-input" name="q" placeholder="New search..." autocomplete="on"/>
<input class="site-header-search-input" name="q" placeholder="New search..." autocomplete="on" title="Search" aria-label="Search"/>
</form>
</div>
<div class="site-header-nav scroll-container">
Expand Down
2 changes: 1 addition & 1 deletion app/test/task/testdata/goldens/packages/oxygen.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<div class="site-header-mask"></div>
<div class="site-header-search">
<form action="/packages" method="GET">
<input class="site-header-search-input" name="q" placeholder="New search..." autocomplete="on"/>
<input class="site-header-search-input" name="q" placeholder="New search..." autocomplete="on" title="Search" aria-label="Search"/>
</form>
</div>
<div class="site-header-nav scroll-container">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<div class="site-header-mask"></div>
<div class="site-header-search">
<form action="/packages" method="GET">
<input class="site-header-search-input" name="q" placeholder="New search..." autocomplete="on"/>
<input class="site-header-search-input" name="q" placeholder="New search..." autocomplete="on" title="Search" aria-label="Search"/>
</form>
</div>
<div class="site-header-nav scroll-container">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<div class="site-header-mask"></div>
<div class="site-header-search">
<form action="/packages" method="GET">
<input class="site-header-search-input" name="q" placeholder="New search..." autocomplete="on"/>
<input class="site-header-search-input" name="q" placeholder="New search..." autocomplete="on" title="Search" aria-label="Search"/>
</form>
</div>
<div class="site-header-nav scroll-container">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<div class="site-header-mask"></div>
<div class="site-header-search">
<form action="/packages" method="GET">
<input class="site-header-search-input" name="q" placeholder="New search..." autocomplete="on"/>
<input class="site-header-search-input" name="q" placeholder="New search..." autocomplete="on" title="Search" aria-label="Search"/>
</form>
</div>
<div class="site-header-nav scroll-container">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<div class="site-header-mask"></div>
<div class="site-header-search">
<form action="/packages" method="GET">
<input class="site-header-search-input" name="q" placeholder="New search..." autocomplete="on"/>
<input class="site-header-search-input" name="q" placeholder="New search..." autocomplete="on" title="Search" aria-label="Search"/>
</form>
</div>
<div class="site-header-nav scroll-container">
Expand Down
2 changes: 1 addition & 1 deletion app/test/task/testdata/goldens/packages/oxygen/score.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<div class="site-header-mask"></div>
<div class="site-header-search">
<form action="/packages" method="GET">
<input class="site-header-search-input" name="q" placeholder="New search..." autocomplete="on"/>
<input class="site-header-search-input" name="q" placeholder="New search..." autocomplete="on" title="Search" aria-label="Search"/>
</form>
</div>
<div class="site-header-nav scroll-container">
Expand Down
Loading