You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/docs/1-getting-started/accessibility/index.html
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -534,7 +534,7 @@ <h1 class="h2 mt-0 t-bold t-balance">Accessibility features in Codebase</h1>
534
534
<p>Numerous accessibility considerations have been factored into Codebase 5. These are, in summary:</p>
535
535
<ol>
536
536
<li>Default font size is 100% (usually defaults to 16px), bumping up to 112.5% (18px) for <code>sm</code> viewports up (see <ahref="/codebase-5/docs/1-getting-started/responsive-design/">responsive design</a>).</li>
537
-
<li>Accessible UI colors</li>
537
+
<li>Accessible user interface (UI) colors</li>
538
538
<li>Link underine becomes thicker on hover, making the hover state more obvious</li>
539
539
<li><code>:focus</code> ring styling for form elements and buttons</li>
540
540
<li><code>:focus-visible</code> styling for links</li>
@@ -543,7 +543,7 @@ <h1 class="h2 mt-0 t-bold t-balance">Accessibility features in Codebase</h1>
543
543
<h2id="default-font-size" tabindex="-1">Default font size</h2>
544
544
<p>The 100% font size defaults to 16px in most web browsers. Various guidelines recommend a larger font size, so the Codebase default bumps up 10 112.5% (18px) for devices larger than phones.</p>
545
545
<p>The advantage of <em>not setting a default font size in px</em> is that it allows your website to be scaled to the <em>user’s</em> preferred default font size – some people with sight impairments may increase their default font size in their browser settings. You don’t want to prevent that from happening by setting your font size in px.</p>
546
-
<p>From there, all typography sizes and spacing sizes (margins, paddings, and gaps) in Codebase are set in rems or ems -- making them dependant on the root font size.</p>
546
+
<p>From there, all typography sizes and spacing sizes (margins, paddings, and gaps) in Codebase are set in rems or ems – making them dependant on the root font size.</p>
<li>If a scrollable element has overflowing content, then it will recieve <code>:focus-visible</code> when tabbing — except that are using the Safari browser can't tab onto e.g. overflowing <code><pre></code> elements, or overflowing elements with the Codebase <code>overflow-x</code> or <code>overflow-y</code> class.</li>
598
+
<li>If a scrollable element has overflowing content, then it will recieve <code>:focus-visible</code> when tabbing — except that are using the Safari browser can’t tab onto e.g. overflowing <code><pre></code> elements, or overflowing elements with the Codebase <code>overflow-x</code> or <code>overflow-y</code> class.</li>
599
599
<li>Images within Links (i.e. <code>a img</code>) will become slightly transparent (using an opacity filter) when the link has recieved <code>:focus-visible</code>, allowing the amber background to show though. See <ahref="/codebase-5/docs/2-classless-basics/media/#linked-images">media: linked images</a></li>
600
-
<li>Codebase also has <ahref="/codebase-5/docs/6-simple-components/panel-links/">panel links</a> — these are simply links where you want only <em>some</em> of the text to look like a link (e.g. maybe you have an explainer in smaller text on a big button; maybe you have a feature panel where you want the whole thing wrapped in an <code><a href=""></code> (link), but only the title to be styled as a link (with an underscore etc.)). For these, when the panel recieves <code>:focus-visible</code>, only the panel link title text becomes black and recieves the thick black underline, while the other text becomes a dark amber color (so that the user's attention goes to the link title), while the whole panel gets the amber background <code>:focus-visible</code> panel gets the amber background. And if there's an image in your panel link, then it will get the opacity filter effect too.</li>
600
+
<li>Codebase also has <ahref="/codebase-5/docs/6-simple-components/panel-links/">panel links</a> — these are simply links where you want only <em>some</em> of the text to look like a link (e.g. maybe you have an explainer in smaller text on a big button; maybe you have a feature panel where you want the whole thing wrapped in an <code><a href=""></code> (link), but only the title to be styled as a link (with an underscore etc.)). For these, when the panel recieves <code>:focus-visible</code>, only the panel link title text becomes black and recieves the thick black underline, while the other text becomes a dark amber color (so that the user's attention goes to the link title), while the whole panel gets the amber background <code>:focus-visible</code> panel gets the amber background. And if there’s an image in your panel link, then it will get the opacity filter effect too.</li>
<p>Besides moving up to AlpineJS version 3, the Alpine powered components in these docs have been improved to enable usability via keyboard and assistive tech:</p>
<p>Here are some simple components that you can build using Codebase (I’m calling a component “simple” if it requires only CSS and no JavaScript for functionality):</p>
567
+
<p>Here are some simple component examples that you can build using Codebase (I’m calling a component “simple” if it requires only CSS and no JavaScript for functionality):</p>
568
568
<ul>
569
569
<li><ahref="/codebase-5/docs/6-simple-components/menus-and-menubars">Menus and menubars</a></li>
<h4id="components-using-alpinejs" tabindex="-1">Components using AlpineJS</h4>
580
-
<p>Codebase pairs well with <ahref="https://alpinejs.dev/">AlpineJS</a>. The Codebase components examples in these docs have been re-factored to use Alpine v3.</p>
580
+
<p>Codebase pairs well with <ahref="https://alpinejs.dev/">AlpineJS</a>. The Codebase-plus-AlpineJS component examples in these docs have been re-factored to use Alpine v3.</p>
581
581
<p><strong>Notes:</strong></p>
582
582
<ol>
583
583
<li><code>codebase.css</code> does not require Alpine as a dependency. You can use Codebase with other JS frameworks, or none at all.</li>
<p>Available in the repository are all the Codebase <ahref="https://github.com/codebase-frontend-library/codebase-5/tree/main/src/codebase/scss">SCSS files</a>.</p>
600
600
<p><strong>Notes:</strong></p>
601
601
<ol>
602
-
<li>Codebase uses <ahref="/codebase-5/docs/1-getting-started/css-variables/">CSS variables</a>**, not Sass variables.</li>
602
+
<li>Codebase uses <ahref="/codebase-5/docs/1-getting-started/css-variables/">CSS variables</a>, not Sass variables.</li>
603
603
<li><em>PostCSS</em> and its associated dependencies have not been used. So there are no generated vendor prefixes (for supporting pre ~2018 browsers). In the few places where vendor prefixes are still required (in the body tag, and in the glassmorphic overlays), I have added them manually. CSS minification is done thorugh <code>--style compact</code> on the <em>Sass</em> package (not CSS Nano).</li>
0 commit comments