Skip to content

Commit

Permalink
Merge branch 'main' into ticket/195-update-files-with-correct-node-ve…
Browse files Browse the repository at this point in the history
…rsion
  • Loading branch information
zoltan-dulac authored Sep 9, 2024
2 parents 63d10e2 + b2e6368 commit 5e0056b
Show file tree
Hide file tree
Showing 9 changed files with 495 additions and 45 deletions.
38 changes: 38 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,44 @@ If you are trying to contribute to the Enable site from a forked version of this

You will need to update the version number that NPM broadcasts as the latest version number. Please use [np](https://github.com/sindresorhus/np) to do this (it is what we have used in the past). This should be done by development lead of the Enable project (as of this writing, this is [Zoltan Hawryluk](https://www.npmjs.com/~zoltandulac)).

### Strcutured Data Markup

Structured Data Markup is a way to label or tag the content on your website so that search engines and other platforms can better understand it.

The Article and HowTo tags are two types of structured data markup that help search engines understand specific kinds of content.

#### Article Tag:

This is used to mark up articles, blog posts, or other written content. By using the Article tag, we help search engines identify the main parts of your article, like the headline. This can make your article show up better in search results, sometimes with extra features like the headline or image preview.

#### HowTo Tag:

This is used for content that gives step-by-step instructions on how to do something. When you use the HowTo tag, search engines can display your instructions in a more detailed way, often showing each step directly in the search results.

Example of checkbox in the meta-info.json, where the mainEntity can be an array of 'Article' and 'HowTo' objects extracted from page:

```json
"checkbox.php": {
"title": "How to Create Accessible Checkboxes",
"desc": "Here is a step-by-step guide to creating accessible checkboxes",
"url": "https://www.useragentman.com/enable/checkbox.php",
"mainEntity":[
{
"type": "Article",
"title": "A real styled HTML5 checkbox",
"desc": "You can style an HTML5 checkbox using CSS easily.",
"url": "https://www.useragentman.com/enable/checkbox.php#a-real-styled-html5-checkbox--heading"
},
{
"type": "HowTo",
"title": "Step-by-Step to make the styled checkboxe accessible",
"desc": "See the dropdown to highlight each of the individual steps that make the styled checkboxe accessible",
"url": "https://www.useragentman.com/enable/checkbox.php#developer-walkthrough-1"
},
]
}
```

## References

When testing using screen readers, these resources may be of help to you:
Expand Down
3 changes: 3 additions & 0 deletions content/body/acknowledgements.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
</p>

<ul>
<li><a href="https://github.com/saumyajitc">Saumyajit Chowdhury</a> for implementing husky pre-commit hooks to run lint-staged before pushing code to the repository</li>
<li><a href="https://github.com/majid-paktinat">Majid Paktinat</a> and <a href="https://github.com/akshaypanchal">Akshaykumar Panchal</a> for implementing dynamic Structured Data Markup for improving the SEO of the Enable Project.</li>
<li><a href="https://github.com/alisonhall">Alison Hall</a> for cleaning up and streamlining the unit testing and automated testing NPM tasks (and also doing the difficult task of updating the NPM packages within the project in 2024).
</li>
<li>Sahil Singh for unit tests for the <a href="input-mask.php">input mask component</a>.</li>
Expand All @@ -30,6 +32,7 @@
</p>

<ul>
<li><a href="https://github.com/saumyajitc">Saumyajit Chowdhury</a> for implementing deployment procedures in <a href="https://enable-a11y-react-iqpmwl8kb-publicis-sapient-sandbox.vercel.app/" target="new">Vercel</a> for <a href="https://github.com/PublicisSapient/enable-a11y-react" target="new">Enable(react version)</a> and create npm package for external use of the accessible components.</li>
<li><a href="https://twitter.com/lsnrae">Alison Walden</a> for her UX guidelines for both <a
href="https://lsnrae.medium.com/if-you-must-use-a-carousel-make-it-accessible-977afd0173f4">accessible
carousels</a> and <a href="https://lsnrae.medium.com/accessible-form-validation-9fa637ddb0fc">form validation</a>
Expand Down
14 changes: 14 additions & 0 deletions content/body/focus-styling.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
<p>
Before we dive into making focus outlines accessible, let's first understand what a focus outline is and why it’s important for web accessibility, particularly for screen readers.
If you're already familiar with focus outlines, feel free to skip to the next section. For those who aren’t, here's a brief definition.
</p>

<h2>What is a Focus Outline?</h2>

<p>
Simply put, when a specific HTML element is ready to accept keyboard input, it is considered to be "in focus."
As users navigate a webpage using the keyboard (typically via the Tab key), different elements receive focus, allowing screen readers to read their content.
According to accessibility standards, any element in focus should have a visible border around it, known as the focus outline. This helps users, especially those relying on screen readers or keyboard navigation, to know which element is currently active.
</p>


<p>
Focus states are used by keyboard users to know what interactive element they can currently manipulate. They are easily
styled with the <code>outline</code> CSS property and the <code>:focus</code> and <code>:focus-visible</code> pseudo-classes.
Expand Down
23 changes: 0 additions & 23 deletions content/body/form-error-checking.php
Original file line number Diff line number Diff line change
Expand Up @@ -271,29 +271,6 @@
}
</script>

<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "WebPage",
"name": "Accessible Form Validation: HTML5 and Custom Approaches",
"description": "Learn how to make form validation and error checking accessible using HTML5 and custom validation methods. Includes code examples and best practices.",
"url": "https://www.useragentman.com/enable/form-error-checking.php",
"mainEntity": [
{
"@type": "HowTo",
"name": "Using HTML5 for Accessible Form Validation",
"text": "You can use just the required and pattern attributes on HTML forms to do client-side validation without JavaScript.",
"url": "https://www.useragentman.com/enable/form-error-checking.php#using-native-html5-validation--heading"
},
{
"@type": "HowTo",
"name": "Using Custom Validation for Accessible Form Validation",
"text": "You can use enable-a11y node package to handle client-side form validation and error messages.",
"url": "https://www.useragentman.com/enable/form-error-checking.php#using-custom-validation--heading"
}
]
}
</script>


<?= includeNPMInstructions("accessibility", [], null, false, [
Expand Down
Loading

0 comments on commit 5e0056b

Please sign in to comment.