diff --git a/app/helpers/section_tab_helper.rb b/app/helpers/section_tab_helper.rb index ce8775e47d62a..aa86c55c78400 100644 --- a/app/helpers/section_tab_helper.rb +++ b/app/helpers/section_tab_helper.rb @@ -73,8 +73,7 @@ def section_tabs end def section_tab_tag(tab, context, active_tab) - tab_generator = @domain_root_account.try(:feature_enabled?, :a11y_left_menu) ? SectionTabTagNew : SectionTabTag - concat(tab_generator.new(tab, context, active_tab).to_html) + concat(SectionTabTag.new(tab, context, active_tab).to_html) end class AvailableSectionTabs @@ -146,69 +145,6 @@ def a_classes end end - def a_aria_current_page - 'page' if @tab.active?(@active_tab) - end - - def a_attributes - { href: @tab.path, - title: @tab.label, - 'aria-current': a_aria_current_page, - class: a_classes }.tap do |h| - h[:target] = @tab.target if @tab.target? - end - end - - def a_tag - content_tag(:a, a_attributes) do - concat(@tab.label) - concat(span_tag) - end - end - - def li_classes - [ 'section' ].tap do |a| - a << 'section-tab-hidden' if @tab.hide? || @tab.unused? - end - end - - def span_tag - if @tab.hide? || @tab.unused? - if @tab.hide? - text = I18n.t('* Disabled in Course Settings') - else - text = I18n.t('* No content has been added') - end - content_tag(:span, text, { - id: 'inactive_nav_link', - class: 'screenreader-only' - }) - end - end - - def to_html - content_tag(:li, a_tag, { - class: li_classes - }) - end - end - - class SectionTabTagNew - include ActionView::Context - include ActionView::Helpers::TagHelper - include ActionView::Helpers::TextHelper - - def initialize(tab, context, active_tab=nil) - @tab = SectionTabPresenter.new(tab, context) - @active_tab = active_tab - end - - def a_classes - [ @tab.css_class.downcase.replace_whitespace('-') ].tap do |a| - a << 'active' if @tab.active?(@active_tab) - end - end - def a_title if @tab.hide? I18n.t('Disabled. Not visible to students') diff --git a/app/stylesheets/base/_#left-side.scss b/app/stylesheets/base/_#left-side.scss index 65032035a9591..4137d518264f9 100644 --- a/app/stylesheets/base/_#left-side.scss +++ b/app/stylesheets/base/_#left-side.scss @@ -19,13 +19,3 @@ #left-side { display: none; } - -#section-tabs .section-tab-hidden a { - @if $use_high_contrast { - color: darken($ic-course-sidenav_list-item--inactive-font-color, 45%); - background: lighten($ic-course-sidenav_list-item--inactive-font-color, 15%); - } - @else { - color: $ic-course-sidenav_list-item--inactive-font-color; - } -} diff --git a/app/stylesheets/components/_components.scss b/app/stylesheets/components/_components.scss index 124428aa84270..cc1cefe9686c7 100644 --- a/app/stylesheets/components/_components.scss +++ b/app/stylesheets/components/_components.scss @@ -24,10 +24,6 @@ } // List View -/* .list-view-a11y-left-menu-flag supersedes this based on a11y_left_menu - release flag. After release, ADMIN-2778 will switch back to .list-view - name with new CSS. - */ .list-view { overflow: auto; & > header, @@ -51,89 +47,6 @@ border-top: 0 !important; // oldskool important } - & > ul, - // oldskool overrides - & > nav > ul { - list-style: none; - margin: 0; - padding: 0; - - & > li { - padding: 0; - & > a { - display: block; - text-decoration: none; - color: $ic-font-color-dark; - border-radius: $baseBorderRadius; - padding: ($ic-sp - 4) $ic-sp; - overflow-wrap: break-word; - word-wrap: break-word; - hyphens: auto; - line-height: $ic-label-line-height; - - @if $use_high_contrast { - text-decoration: underline; - } - - &:hover, &:focus { - background: lighten($ic-color-neutral, 5%); - } - - & > span { - white-space: nowrap; - } - } - - &:last-child > a { - border-bottom: 0; - } - } - } - - // lists w/o headers still need a strong border - & > ul + ul { - border-top: 1px solid $ic-border-light; - } - - a.active { - background-color: var(--ic-brand-primary); - font-weight: bold; - color: $ic-color-light; - - // offset focus ring so it doesn't blend in with background - &:focus { @include ic-focus-variant($offset: 0.0625rem); } - - &:hover, &:focus { background-color: var(--ic-brand-primary); } - .nav-badge { - background: $ic-color-light; - color: var(--ic-brand-primary); - } - } -} - -.list-view-a11y-left-menu-flag { - overflow: auto; - & > header, - // oldskool compat - #section-tabs-header { - @include fontSize($ic-font-size--small); - font-weight: bold; - margin: 0 0 $ic-sp/2; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - } - #section-tabs-header-subtitle { - display: block; - @include fontSize(11px); - font-style: italic; - color: inherit; - } - - & > *:first-child { - border-top: 0 !important; // oldskool important - } - & > nav.theme-preview { padding: 3px; } diff --git a/app/views/brand_configs/show.html.erb b/app/views/brand_configs/show.html.erb index 07c7e0c255966..ea39c503952df 100644 --- a/app/views/brand_configs/show.html.erb +++ b/app/views/brand_configs/show.html.erb @@ -254,7 +254,7 @@
-
+