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

907 refactor wayback search a11y #912

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
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
8 changes: 4 additions & 4 deletions packages/ia-wayback-search/src/ia-wayback-search.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,18 @@ class WaybackSearch extends LitElement {
>
on the Internet.
</p>
<fieldset>
<div class="search-background">
<a
@click=${this.emitWaybackMachineLogoLinkClicked}
data-event-click-tracking="TopNav|WaybackMachineLogoLink"
href="https://web.archive.org"
aria-label="Wayback Machine homepage"
>${logo}</a>
<label for="url">Search the Wayback Machine</label>
<div class="search-field">
<input type="text" name="url" id="url" placeholder="enter URL or keywords" />
<input type="text" name="url" id="url" placeholder="enter URL or keywords" aria-label="Search the Wayback Machine"/>
${searchIcon}
</div>
</fieldset>
</div>
</form>
`;
}
Expand Down
5 changes: 2 additions & 3 deletions packages/ia-wayback-search/src/icon-search.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/ia-wayback-search/src/logo.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

46 changes: 16 additions & 30 deletions packages/ia-wayback-search/src/styles/wayback-search.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,6 @@ export default css`
color: var(--activeColor);
}

fieldset {
padding: 0.7rem 2rem;
margin: 1.5rem 0;
box-sizing: border-box;
text-align: center;
border: none;
border-radius: 7px;
background-color: #fcf5e6;
box-shadow: 3px 3px 0 0 #c3ad97;
}

label {
display: none;
}

img {
width: 100%;
max-width: 215px;
Expand All @@ -49,17 +34,22 @@ export default css`
height: 3rem;
padding: 0.5rem 1rem 0.5rem 2.5rem;
font: normal 1.2rem/1.5 var(--themeFontFamily);
color: #858585;
color: #000;
box-sizing: border-box;
border: 1px solid var(--grey80);
border-radius: 2rem;
background: #eee;
border: 1px solid #000;
border-radius: 7px;
background: #fff;
}

input:focus {
border-color: #66afe9;
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6);
outline: none;
.search-background {
padding: 0.7rem 2rem;
margin: 1.5rem 0;
box-sizing: border-box;
text-align: center;
border: none;
border-radius: 7px;
background-color: #fcf5e6;
box-shadow: 3px 3px 0 0 #c3ad97;
}

.search-field {
Expand All @@ -79,10 +69,6 @@ export default css`
fill: var(--iconFill);
}

input:focus + svg {
display: none;
}

@media (min-width: 890px) {
form {
margin: 0 auto;
Expand All @@ -98,19 +84,19 @@ export default css`
margin: 0;
}

fieldset {
.search-background {
margin: 0 auto;
font-size: 0;
}

fieldset a,
.search-background a,
.search-field {
display: inline-block;
width: 50%;
vertical-align: middle;
}

fieldset a {
.search-background a {
text-align: center;
}

Expand Down