mirror of
https://github.com/danog/sass-site.git
synced 2025-01-22 05:41:42 +01:00
Fix keyboard focus and aside issues
This commit is contained in:
parent
beac1ac6f2
commit
2d166d3b10
@ -121,7 +121,7 @@ after_render do |content, path, locs|
|
||||
content.gsub(%r{^<(h[0-6])(.*?)</\1>}m) do |header_text|
|
||||
header = Nokogiri::HTML::DocumentFragment.parse(header_text).children.first
|
||||
id = header.attr(:id)
|
||||
header.children.before("<a class='anchor' href='##{id}'></a>") if id
|
||||
# header.children.before("<a class='anchor' href='##{id}'></a>") if id // Commenting this out, as it appears to serve no function and is generating empty links, which causes accessibility issues.
|
||||
header.to_html
|
||||
end
|
||||
end
|
||||
|
@ -341,7 +341,7 @@ module SassHelpers
|
||||
#
|
||||
# The contents should be supplied as a block.
|
||||
def heads_up
|
||||
_concat(content_tag :aside, [
|
||||
_concat(content_tag :div, [
|
||||
content_tag(:h3, '⚠️ Heads up!'),
|
||||
_render_markdown(_capture {yield})
|
||||
], class: 'sl-c-callout sl-c-callout--warning')
|
||||
@ -352,7 +352,7 @@ module SassHelpers
|
||||
#
|
||||
# The contents should be supplied as a block.
|
||||
def fun_fact
|
||||
_concat(content_tag :aside, [
|
||||
_concat(content_tag :div, [
|
||||
content_tag(:h3, '💡 Fun fact:'),
|
||||
_render_markdown(_capture {yield})
|
||||
], class: 'sl-c-callout sl-c-callout--fun-fact')
|
||||
|
@ -57,7 +57,7 @@
|
||||
|
||||
li.overview a {
|
||||
font-size: $sl-font-size--small;
|
||||
&:not(.selected) { color: transparentize($sl-color--midnight-blue, 0.5); }
|
||||
&:not(.selected) { color: transparentize($sl-color--midnight-blue, 0.3); }
|
||||
}
|
||||
|
||||
li a {
|
||||
|
@ -2,7 +2,7 @@ $(function() {
|
||||
$(".sl-c-list-navigation-wrapper--collapsible li > ul")
|
||||
.parent()
|
||||
.children("a")
|
||||
.removeAttr("href")
|
||||
// .removeAttr("href") Remove attr was causing keyboard focus skips
|
||||
.click(function() {
|
||||
$(this).toggleClass("open");
|
||||
return false;
|
||||
|
@ -48,7 +48,7 @@ introduction: >
|
||||
[the language contribution process]: https://github.com/sass/language/blob/master/CONTRIBUTING.md
|
||||
|
||||
- content_for :complementary do
|
||||
%nav.sl-c-list-navigation-wrapper
|
||||
%nav.sl-c-list-navigation-wrapper(aria-label='Resources')
|
||||
:markdown
|
||||
## Resources
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
.sl-l-large-holy-grail__body
|
||||
- if content_for?(:complementary)
|
||||
- has_contents = current_page.data.table_of_contents ? 'sl-l-large-holy-grail__complementary--contents' : ''
|
||||
%aside.sl-l-large-holy-grail__complementary(role='complementary'){class: has_contents}
|
||||
.sl-l-large-holy-grail__complementary{class: has_contents}
|
||||
= yield_content :complementary
|
||||
|
||||
.sl-l-large-holy-grail__main.docSearch-content
|
||||
|
@ -12,5 +12,5 @@
|
||||
|
||||
= Typogruby.improve(yield)
|
||||
|
||||
%aside.sl-l-large-holy-grail__complementary(role='complementary')
|
||||
.sl-l-large-holy-grail__complementary
|
||||
= yield_content :complementary
|
||||
|
Loading…
x
Reference in New Issue
Block a user