Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork66
A11y: Increase the target area for single-letter index links#103
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -230,6 +230,18 @@ dl > dt span ~ em { | ||
padding-left: 20px; | ||
} | ||
div.genindex-jumpbox, | ||
div.genindex-jumpbox > p { | ||
display: inline-flex; | ||
flex-wrap: wrap; | ||
} | ||
div.genindex-jumpbox a { | ||
margin: 0 5px; | ||
min-width: 30px; | ||
text-align: center; | ||
} | ||
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. Another option would be to use You could even try to use negative margins to expand the clickable area on the space characters between the 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. Good idea! Updated and rebuilt the demo: https://hugovk-cpython.readthedocs.io/en/accessibilty-index-target-area/genindex.html https://hugovk-cpython.readthedocs.io/en/accessibilty-index-target-area/genindex-all.html Applied the flexbox container to two places here: div.genindex-jumpbox,div.genindex-jumpbox>p {display: inline-flex;flex-wrap: wrap;} Because the structure is slightly different on the two pages. The first is: <divclass="genindex-jumpbox"><p> [all the A-Z links]</p><p> [full index link]</p></div> The second is: <divclass="genindex-jumpbox"> [all the A-Z links]</div> HTML details<divclass="genindex-jumpbox"><p><ahref="genindex-Symbols.html"><strong>Symbols</strong></a> |<ahref="genindex-_.html"><strong>_</strong></a> |<ahref="genindex-A.html"><strong>A</strong></a> |<ahref="genindex-B.html"><strong>B</strong></a> |<ahref="genindex-C.html"><strong>C</strong></a> |<ahref="genindex-D.html"><strong>D</strong></a> |<ahref="genindex-E.html"><strong>E</strong></a> |<ahref="genindex-F.html"><strong>F</strong></a> |<ahref="genindex-G.html"><strong>G</strong></a> |<ahref="genindex-H.html"><strong>H</strong></a> |<ahref="genindex-I.html"><strong>I</strong></a> |<ahref="genindex-J.html"><strong>J</strong></a> |<ahref="genindex-K.html"><strong>K</strong></a> |<ahref="genindex-L.html"><strong>L</strong></a> |<ahref="genindex-M.html"><strong>M</strong></a> |<ahref="genindex-N.html"><strong>N</strong></a> |<ahref="genindex-O.html"><strong>O</strong></a> |<ahref="genindex-P.html"><strong>P</strong></a> |<ahref="genindex-Q.html"><strong>Q</strong></a> |<ahref="genindex-R.html"><strong>R</strong></a> |<ahref="genindex-S.html"><strong>S</strong></a> |<ahref="genindex-T.html"><strong>T</strong></a> |<ahref="genindex-U.html"><strong>U</strong></a> |<ahref="genindex-V.html"><strong>V</strong></a> |<ahref="genindex-W.html"><strong>W</strong></a> |<ahref="genindex-X.html"><strong>X</strong></a> |<ahref="genindex-Y.html"><strong>Y</strong></a> |<ahref="genindex-Z.html"><strong>Z</strong></a></p><p><ahref="genindex-all.html"><strong>Full index on one page</strong> (can be huge)</a></p></div> <divclass="genindex-jumpbox"><ahref="#Symbols"><strong>Symbols</strong></a> |<ahref="#_"><strong>_</strong></a> |<ahref="#A"><strong>A</strong></a> |<ahref="#B"><strong>B</strong></a> |<ahref="#C"><strong>C</strong></a> |<ahref="#D"><strong>D</strong></a> |<ahref="#E"><strong>E</strong></a> |<ahref="#F"><strong>F</strong></a> |<ahref="#G"><strong>G</strong></a> |<ahref="#H"><strong>H</strong></a> |<ahref="#I"><strong>I</strong></a> |<ahref="#J"><strong>J</strong></a> |<ahref="#K"><strong>K</strong></a> |<ahref="#L"><strong>L</strong></a> |<ahref="#M"><strong>M</strong></a> |<ahref="#N"><strong>N</strong></a> |<ahref="#O"><strong>O</strong></a> |<ahref="#P"><strong>P</strong></a> |<ahref="#Q"><strong>Q</strong></a> |<ahref="#R"><strong>R</strong></a> |<ahref="#S"><strong>S</strong></a> |<ahref="#T"><strong>T</strong></a> |<ahref="#U"><strong>U</strong></a> |<ahref="#V"><strong>V</strong></a> |<ahref="#W"><strong>W</strong></a> |<ahref="#X"><strong>X</strong></a> |<ahref="#Y"><strong>Y</strong></a> |<ahref="#Z"><strong>Z</strong></a></div> | ||
@media (max-width: 1023px) { | ||
/* Body layout */ | ||
div.body { | ||