Skip to content

Commit

Permalink
Merge pull request #491 from GSA-TTS/LG-12800_small_updates
Browse files Browse the repository at this point in the history
LG-12800 small updates
  • Loading branch information
ajfarkas authored Jul 5, 2024
2 parents 20fa1e9 + 14554f6 commit e972e2d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 11 deletions.
7 changes: 2 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,9 @@ Run the tests:
make test
```

This site uses the [U.S. Web Design System](https://designsystem.digital.gov/). To update them:
This site uses the anchor.js. To update it:

1. Download the [latest release](https://designsystem.digital.gov/download)
2. Copy contents to `assets/`
3. Rename directory to `uswds`
4. Download latest [anchor.js](https://github.com/bryanbraun/anchorjs) and put in `assets/js/`
- Download latest [anchor.js](https://github.com/bryanbraun/anchorjs) and put in `assets/js/`

#### YAML files

Expand Down
2 changes: 1 addition & 1 deletion _pages/support.md
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ https://idp.int.identitysandbox.gov/openid_connect/authorize?
<div id="supportedbrowsers" class="usa-accordion__container">
<div class="usa-accordion__content">
<p>
Login.gov uses the <a class="usa-link" href="https://designsystem.digital.gov/">a US Web Design System (USWDS) </a> components on our websites. The current version (USWDS 3.0.0) supports the newest versions of Chrome, Firefox, and Safari. Internet Explorer 11 (IE11) is no longer officially supported and therefore is not recommended for use with Login.gov. If you experience issues connecting with Login.gov, try using one of the recommended browsers before contacting technical support.
Login.gov uses the <a class="usa-link" href="https://designsystem.digital.gov/">US Web Design System (USWDS) </a> components on our websites. The current version (USWDS 3) supports the newest versions of Chrome, Firefox, and Safari. Internet Explorer 11 (IE11) is no longer officially supported and therefore is not recommended for use with Login.gov. If you experience issues connecting with Login.gov, try using one of the recommended browsers before contacting technical support.
</p>
</div>
</div>
Expand Down
3 changes: 2 additions & 1 deletion _plugins/content_code.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
require 'rouge'

# Include tabindex for accessibility reasons
# See: https://github.com/rouge-ruby/rouge?tab=readme-ov-file#formatters
class Rouge::Formatters::HTMLPygmentsA11y < Rouge::Formatters::HTMLPygments
def stream(tokens, &b)
yield %(<div class="highlight"><pre class="#{@css_class}"><code tabindex="0">)
yield %(<div class="highlight"><pre class="#{@css_class}" tabindex="0"><code>)
@inner.stream(tokens, &b)
yield "</code></pre></div>"
end
Expand Down
6 changes: 2 additions & 4 deletions spec/e2e/accessibility.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@ import getPort from 'get-port';
// only test canonical paths
const paths = (() => {
const file = readFileSync('./_site/sitemap.xml', { encoding: 'utf8' });
const pathMatch = file.matchAll(/[.gov|:4000](\/[A-Za-z-]+\/?[A-Za-z-]*\/)<\/loc/g);
const foundPaths = Array.from(pathMatch).map((a) => a[1]);
foundPaths.unshift('/');
return foundPaths;
const pathMatch = file.matchAll(/<loc>(.+?\/)<\/loc>/g);
return Array.from(pathMatch).map(([, url]) => new URL(url).pathname);
})();

describe('accessibility', () => {
Expand Down

0 comments on commit e972e2d

Please sign in to comment.