-
Notifications
You must be signed in to change notification settings - Fork 640
Accessibility fixes (and tests) #1227
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
Changes from all commits
0929810
c00715f
dd877cc
d3ff8cd
bd4c191
89c8ede
3e94117
f0c8377
72407de
522eb3e
1aa4b29
ea4fb9c
961ba48
7c58178
c27533d
4a36d50
274c841
ed4333a
1ff0a23
fc5a680
2cd5ac1
8d2157a
e7a8209
0682d78
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,8 @@ | ||
{{title "Cargo: packages for Rust" separator=' - ' prepend=true}} | ||
{{google-jsapi}} | ||
|
||
<a href='https://github.com/rust-lang/crates.io' class='fork-me'> | ||
<img src='/assets/forkme.png'/> | ||
</a> | ||
|
||
<div id="header"> | ||
{{#link-to "index"}} | ||
<nav id="header"> | ||
{{#link-to "index" tabindex="-1"}} | ||
<img src="/assets/Cargo-Logo-Small.png" id="logo" | ||
height=100 width=100 alt="Cargo Logo"/> | ||
{{/link-to}} | ||
|
@@ -23,9 +19,9 @@ | |
value={{searchQuery}} | ||
oninput={{action (mut searchQuery) value="target.value"}} | ||
autofocus="autofocus" | ||
tabindex="1" | ||
required | ||
data-test-search-input> | ||
<label for="cargo-desktop-search">Search</label> | ||
</form> | ||
|
||
<div class='nav'> | ||
|
@@ -100,25 +96,25 @@ | |
|
||
<div class='links'> | ||
</div> | ||
</div> | ||
</nav> | ||
|
||
<form id='mobile-search' class='search' action='/search' {{ action "search" on="submit" }} > | ||
<input type="text" class="search" name="q" | ||
<input type="text" class="search" name="q" id="cargo-mobile-search" | ||
placeholder="Search" | ||
value={{searchQuery}} | ||
oninput={{action (mut searchQuery) value="target.value"}} | ||
autocorrect="off" | ||
tabindex="1" | ||
required> | ||
<label for="cargo-mobile-search">Search</label> | ||
</form> | ||
|
||
<div id="main" class='inner-content'> | ||
<main id="main" class='inner-content'> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is not ideal since each page should define it's own |
||
{{flash-message}} | ||
|
||
{{outlet}} | ||
</div> | ||
</main> | ||
|
||
<div class='after-main-links'> | ||
<footer class='after-main-links'> | ||
{{#link-to 'install'}}Install{{/link-to}} | ||
<span class="sep">|</span> | ||
<a href='http://doc.crates.io'>Getting Started</a> | ||
|
@@ -128,4 +124,8 @@ | |
<a href='mailto:[email protected]'>Send us an email</a> | ||
<span class="sep">|</span> | ||
{{#link-to 'policies'}}Policies{{/link-to}} | ||
</div> | ||
</footer> | ||
|
||
<a href='https://github.com/rust-lang/crates.io' class='fork-me'> | ||
<img src='/assets/forkme.png' alt="Fork me on GitHub" /> | ||
</a> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<ul> | ||
<ol> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should keyword-list and category-list be changed to What about crate-downloads-list? This is used on the currently-logged-in user's dashboard and are ordered by recent downloads. Not sure how far we should go with this in this PR-- there are lists of crates that are just There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, probably those need to be updated as well. Would rather do it in a follow-up PR if that's OK. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yup, that's totally fine! |
||
{{#each crates as |crate index|}} | ||
<li> | ||
{{#link-to 'crate' crate.id class='name' data-test-crate-link=index}} | ||
|
@@ -9,4 +9,4 @@ | |
{{/link-to}} | ||
</li> | ||
{{/each}} | ||
</ul> | ||
</ol> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
<li> | ||
{{#link-to 'crate' dep.crate_id}} | ||
{{ dep.crate_id }} {{ format-req dep.req }} | ||
{{/link-to}} | ||
{{#if dep.optional}} | ||
<span class='optional'>optional</span> | ||
{{/if}} | ||
</li> | ||
{{#link-to 'crate' dep.crate_id}} | ||
{{ dep.crate_id }} {{ format-req dep.req }} | ||
{{/link-to}} | ||
{{#if dep.optional}} | ||
<span class='optional'>optional</span> | ||
{{/if}} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -74,7 +74,7 @@ | |
<code id="crate-toml">{{ crate.name }} = "{{ currentVersion.num }}"</code> | ||
|
||
{{#if (is-clipboard-supported)}} | ||
{{#copy-button clipboardTarget="#crate-toml" success=(action 'copySuccess') error=(action 'copyError')}} | ||
{{#copy-button clipboardTarget="#crate-toml" success=(action 'copySuccess') error=(action 'copyError') title="Copy to clipboard"}} | ||
{{svg-jar "copy" alt="Copy to clipboard"}} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The title on the button isn't repetitive with the alt text on the svg inside the button? I really don't know how screenreaders will read this, just wanted to point it out :) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. aXe flagged this as an error, and Orca (the screen reader I test with) didn't read the text from the svg. |
||
{{/copy-button}} | ||
{{/if}} | ||
|
@@ -92,9 +92,9 @@ | |
</span> | ||
</div> | ||
{{#if crate.readme}} | ||
<div class="crate-readme"> | ||
<section class="crate-readme" aria-label="Readme"> | ||
{{crate-readme rendered=crate.readme}} | ||
</div> | ||
</section> | ||
{{else}} | ||
{{#if crate.description}} | ||
<div class='about'> | ||
|
@@ -104,7 +104,7 @@ | |
{{/if}} | ||
{{/if}} | ||
</div> | ||
<div class='authorship'> | ||
<section class='authorship' aria-label="Crate metadata"> | ||
<div class='top'> | ||
<div> | ||
<div class='last-update'><span class='small'>Last Updated</span></div> | ||
|
@@ -225,7 +225,7 @@ | |
<h3>Dependencies</h3> | ||
<ul> | ||
{{#each currentDependencies as |dep|}} | ||
{{link-to-dep dep=dep}} | ||
{{link-to-dep tagName="li" dep=dep}} | ||
{{else}} | ||
<li>None</li> | ||
{{/each}} | ||
|
@@ -243,7 +243,7 @@ | |
</div> | ||
{{/if}} | ||
</div> | ||
</div> | ||
</section> | ||
</div> | ||
|
||
<div id='crate-downloads'> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the
div
on line 146 of this file needs to be updated to asection
as well, otherwise the columns on the home page take up a variable amount of width when they should be taking up ~1/3 of the width, which starts happening at this commit.