Skip to content

Commit

Permalink
Move guidelines checklist outside versioning (#216)
Browse files Browse the repository at this point in the history
* move outside versioning

* rename file

* custom autogenerate sidebar

* specify custom sidebar
  • Loading branch information
ceceppa authored Jul 26, 2024
1 parent 1894a09 commit 5feb51d
Show file tree
Hide file tree
Showing 74 changed files with 158 additions and 829 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
displayed_sidebar: checklist
---

import BottomSheet from './bottomsheet.png';

# BottomSheet & Drawers
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
displayed_sidebar: checklist
---

import TabBar from './tabbar.png';

# Bottom Tab Navigator
Expand Down
File renamed without changes.
File renamed without changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
displayed_sidebar: checklist
---

import Button from './button.png';

# Button
Expand Down
File renamed without changes
File renamed without changes.
5 changes: 5 additions & 0 deletions website/checklist/carousel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
displayed_sidebar: checklist
---

# Carousel
File renamed without changes.
File renamed without changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
displayed_sidebar: checklist
---

import Focus from './focus.gif';

# Focus
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
displayed_sidebar: checklist
---

import FormDisabled from './form-disabled.png';
import FormError from './form-error.png';
import FormFocused from './form-focused.png';
Expand Down
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
displayed_sidebar: checklist
---

import Headers from './headers.png';

# Headings
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
sidebar_position: 0
displayed_sidebar: checklist
---

# Accessibility Checklist
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
displayed_sidebar: checklist
---

import Grid from './grid.png';

# List & Grids
Expand Down
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
4 changes: 4 additions & 0 deletions website/docs/checklist/text.md → website/checklist/text.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
displayed_sidebar: checklist
---

import Text from './text.gif';

# Text
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
displayed_sidebar: checklist
---

# Timed Actions

| User | I Can |
Expand Down
1 change: 0 additions & 1 deletion website/docs/checklist/carousel.md

This file was deleted.

23 changes: 0 additions & 23 deletions website/docs/guidelines/accessibility-hint.md

This file was deleted.

1 change: 0 additions & 1 deletion website/docs/guidelines/grouping.md

This file was deleted.

56 changes: 34 additions & 22 deletions website/docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,24 +139,39 @@ const config: Config = {
...defaultPresets,
},
],
// [
// '@docusaurus/plugin-content-docs',
// {
// id: 'guidelines',
// path: '../docs/guidelines',
// routeBasePath: 'guidelines',
// ...defaultPresets,
// },
// ],
// [
// '@docusaurus/plugin-content-docs',
// {
// id: 'checklist',
// path: '../docs/checklist',
// routeBasePath: '/checklist/',
// ...defaultPresets,
// },
// ],
[
'@docusaurus/plugin-content-docs',
{
id: 'guidelines',
path: 'guidelines',
routeBasePath: 'guidelines',
async sidebarItemsGenerator({
defaultSidebarItemsGenerator,
numberPrefixParser,
item,
version,
docs,
categoriesMetadata,
isCategoryIndex,
}) {
// Example: return an hardcoded list of static sidebar items
return [
{ type: 'doc', id: 'bottomsheet' },
{ type: 'doc', id: 'bottomsheet' },
];
},
...defaultPresets,
},
],
[
'@docusaurus/plugin-content-docs',
{
id: 'checklist',
path: 'checklist',
routeBasePath: '/checklist/',
...defaultPresets,
},
],
],
themeConfig: {
docs: {
Expand All @@ -176,17 +191,14 @@ const config: Config = {
to: '/docs/',
},
{
type: 'docsVersion',
to: 'docs/guidelines',
position: 'left',
label: 'Guidelines',
to: '/guidelines/',
},
{
type: 'docsVersion',
label: 'Checklist',
position: 'left',
to: 'docs/checklist',
to: '/checklist/',
},
{
label: 'Packages',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
displayed_sidebar: guidelines
---

# Accessibility Hint

Accessibility hint helps users understand the element's purpose when the accessibility label alone is not enough.
Expand All @@ -8,12 +12,15 @@ For example:
accessible={true}
accessibilityLabel="Like"
accessibilityHint="Likes the song"
onPress={onPress}>
<View style={styles.button}>lib
onPress={onPress}
>
<View style={styles.button}>
lib
<Text style={styles.buttonText}>Like</Text>
</View>
</TouchableOpacity>
```

In the example announcing only "Like" might be not enough for a screen reader user, so we've added the extra information: "Likes the song."

:::danger
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ ama_severity: Serious
ama_category: Understandable
ama_affected_users: Visual
ama_success_criterion: 4.1.2@https://www.w3.org/WAI/WCAG21/Understanding/name-role-value.html
displayed_sidebar: guidelines
---

# Accessibility Label
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ ama_severity: Critical
ama_category: Operable
ama_affected_users: Visual, Motor
ama_success_criterion: 4.1.2@https://www.w3.org/WAI/WCAG21/Understanding/name-role-value.html
displayed_sidebar: guidelines
---

# Accessibility Role
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ ama_severity: Serious
ama_category: Understandable
ama_affected_users: Visual
ama_success_criterion: 4.1.2@https://www.w3.org/WAI/WCAG21/Understanding/name-role-value.html
displayed_sidebar: guidelines
---

# Accessibility States
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ ama_severity: Critical
ama_category: Operable
ama_affected_users: Cognitive
ama_success_criterion: 2.3.3@https://www.w3.org/WAI/WCAG21/Understanding/animation-from-interactions.html
displayed_sidebar: guidelines
---

# Animations
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ ama_severity: Critical
ama_category: Operable
ama_affected_users: Visual, Motor, Cognitive
ama_success_criterion: 2.3.3@https://www.w3.org/WAI/WCAG21/Understanding/animation-from-interactions.html
displayed_sidebar: guidelines
---

# BottomSheet & Drawer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ ama_severity: Serious
ama_category: Operable
ama_affected_users: Visual, Motor
ama_success_criterion: 2.3.3@https://www.w3.org/WAI/WCAG21/Understanding/animation-from-interactions.html
displayed_sidebar: guidelines
---

# Carousel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ ama_severity: Critical
ama_category: Perceivable
ama_affected_users: Vision
ama_success_criterion: 1.4.3@https://www.w3.org/WAI/WCAG21/Understanding/contrast-minimum
displayed_sidebar: guidelines
---

# Contrast
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ ama_severity: Serious
ama_category: Operable
ama_affected_users: Visual, Mobility, Cognitive
ama_success_criterion: 2.4.3@https://www.w3.org/WAI/WCAG21/Understanding/focus-order
displayed_sidebar: guidelines
---

# Focus
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ ama_severity: Serious
ama_category: Operable
ama_affected_users: Visual, Mobility, Cognitive
ama_success_criterion: 3.3@https://www.w3.org/WAI/WCAG21/Understanding/input-assistance
displayed_sidebar: guidelines
---

import EmailFieldWithError from './email-field-with-error.png';
Expand Down
5 changes: 5 additions & 0 deletions website/guidelines/grouping.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
displayed_sidebar: guidelines
---

# Grouping
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ ama_severity: Serious
ama_category: Operable
ama_affected_users: Visual, Mobility
ama_success_criterion: 2.4.6@https://www.w3.org/WAI/WCAG21/Understanding/headings-and-labels
displayed_sidebar: guidelines
---

import AndroidListFeature from './android-list-feature.gif';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 1
displayed_sidebar: guidelines
---

# Mobile Accessibility Guidelines
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
ama_severity: Serious
ama_category: Perceivable
ama_affected_users: Visual, Mobility
displayed_sidebar: guidelines
---

# Lists & Grids
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
ama_severity: Serious
ama_category: Operable
ama_affected_users: Visual, Mobility
displayed_sidebar: guidelines
---

# Minimum Size
Expand Down
File renamed without changes
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
sidebar_position: 1
displayed_sidebar: guidelines
---

# POUR - Accessibility Principles
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ ama_severity: Serious
ama_category: Perceivable
ama_affected_users: Visual, Mobility
ama_success_criterion: 2.1@https://www.w3.org/WAI/WCAG21/Understanding/distinguishable
displayed_sidebar: guidelines
---

# Text
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ ama_severity: Serious
ama_category: Perceivable
ama_affected_users: Visual, Mobility
ama_success_criterion: 2.2.1@https://www.w3.org/WAI/WCAG21/Understanding/timing-adjustable
displayed_sidebar: guidelines
---

# Timed actions
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
sidebar_position: 2
displayed_sidebar: guidelines
---

# Type of Accessibility Issues
Expand Down
Loading

0 comments on commit 5feb51d

Please sign in to comment.