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

Accessibility issues #80

Open
wants to merge 2 commits into
base: main
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
9 changes: 9 additions & 0 deletions css/clf.drupal.css
Original file line number Diff line number Diff line change
Expand Up @@ -167,3 +167,12 @@ a.close:hover {
background-color: #324d6a;
border-color: #00162f;
}

/* updating ubc7-unit-navigation mobile trigger from an a tag to a button tag alters layout, so we need to reassert the styling - this could be in a better location and done without using !important by increasing the selector specificity */
#ubc7-unit .btn-navbar {
height: 35px !important;
width: 45px !important;
box-sizing: border-box !important;
margin-top: 7px !important;
padding: 11px 13px !important;
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This appears to be all you need and matches the CLF specificity, assuming this file is loaded after the CLF

#ubc7-unit .navbar .btn-navbar {
  height: 35px;
  width: 45px;
  padding: 11px 13px;
}
Screenshot 2024-10-28 at 09 44 04

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, strange. I'm going to have to take another look at why I went so hard on the specificity. I hate using important, so I must have had a reason (or so I hope). Thanks for taking a look and setting me straight on that.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@occupant I added .navbar into your selector so I did make it more specific than your original, maybe that was it?

6 changes: 3 additions & 3 deletions templates/layout/page.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
{% endif %}
</div>
<div id="ubc7-global-utility">
<button type="button" data-toggle="collapse" data-target="#ubc7-global-menu"><span>UBC Search</span></button>
<button type="button" data-toggle="collapse" data-target="#ubc7-global-menu" aria-label="UBC Search toggle" aria-controls="ubc7-global-menu"><span>UBC Search</span></button>
<noscript><a id="ubc7-global-utility-no-script" href="http://www.ubc.ca/">UBC Search</a></noscript>
</div>
</div>
Expand All @@ -132,11 +132,11 @@
<!-- Mobile Menu Icon -->
<div class="navbar">
<!-- TODO: -->
<a class="btn btn-navbar drawer-toggle--primary" data-toggle="collapse" data-target="#ubc7-unit-navigation">
<button class="btn btn-navbar drawer-toggle--primary" data-toggle="collapse" data-target="#ubc7-unit-navigation" aria-label="Mobile menu toggle" aria-controls="ubc7-unit-navigation" type="button">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
</button>
</div>
<div id="ubc7-unit-name"{{ faculty_option != '' ? ' class="ubc7-single-element"' }}>
<a href="{{ base_path }}">
Expand Down