aria-label can be used to provide a name.`,
- status: 'DONE',
- tests: 'TO DO',
- },
- {
- pattern: 'Should have a role button.',
- status: 'DONE',
- tests: 'TO DO',
- },
- {
- pattern: 'Should be focusable and tabable.',
- status: 'DONE',
- tests: 'TO DO',
- },
- {
- pattern: 'Should have cursor: default.',
- status: 'DONE',
- tests: 'N/A',
- },
- {
- pattern:
- 'Should fire onClick on Space/Enter press and mouse click.',
- status: 'DONE',
- tests: 'TO DO',
- },
- {
- pattern: 'Should have a proper type.',
- status: 'DONE',
- tests: 'TO DO',
- },
- {
- pattern: 'Should have a non-color indicator.',
- comment: 'To be implemented by the developer',
- status: 'N/A',
- tests: 'N/A',
- },
- {
- pattern:
- 'Should have a color indicator with 4.5:1 contrast ratio to the background.',
- comment: 'To be implemented by the developer',
- status: 'N/A',
- tests: 'N/A',
- },
- {
- pattern:
- 'Should have a color indicator with 3:1 contrast ratio to the surrounding background.',
- comment: 'To be implemented by the developer',
- status: 'N/A',
- tests: 'N/A',
- },
- {
- pattern: 'Should have a visible disabled state.',
- comment: 'To be implemented by the developer',
- status: 'N/A',
- tests: 'N/A',
- },
-];
-
export default rules;
diff --git a/src/components/buttons/stories/buttonLite.rules.a11y.ts b/src/components/buttons/stories/buttonLite.rules.a11y.ts
new file mode 100644
index 000000000..50e77cbe0
--- /dev/null
+++ b/src/components/buttons/stories/buttonLite.rules.a11y.ts
@@ -0,0 +1,93 @@
+const rules = [
+ {
+ pattern: 'Should have an accessible name.',
+ comment: `Name should be meaningful (ex. "Read more about vitamin C" instead of "Read more") and explain the action
+ (ex. "Search" instead of "Magnifying glass") . aria-label can be used to provide a name.`,
+ status: 'DONE',
+ tests: 'DONE',
+ },
+ {
+ pattern: 'Should have a role button.',
+ status: 'DONE',
+ tests: 'DONE',
+ },
+ {
+ pattern: 'Should be focusable and tabable.',
+ status: 'DONE',
+ tests: 'DONE',
+ },
+ {
+ pattern: 'Should have a non-color indicator.',
+ comment: 'ButtonLite uses bold font weight.',
+ status: 'DONE',
+ tests: 'N/A',
+ },
+ {
+ pattern: 'Should have a proper type.',
+ status: 'DONE',
+ tests: 'TO DO',
+ },
+ {
+ pattern:
+ 'Should have a color indicator with 4.5:1 contrast ratio to the background.',
+ status: 'DONE',
+ tests: 'N/A',
+ },
+ {
+ pattern: 'Should have cursor: default.',
+ status: 'DONE',
+ tests: 'N/A',
+ },
+ {
+ pattern:
+ 'Should fire onClick on Space/Enter press and mouse click.',
+ status: 'DONE',
+ tests: 'DONE',
+ },
+ {
+ pattern: 'Should have a visible disabled state.',
+ status: 'DONE',
+ tests: 'N/A',
+ },
+ {
+ pattern:
+ 'Can have an accessible label that indicates loading state.',
+ comment:
+ 'Use loadingAriaLabel to set custom information, defaults to "loading".',
+ status: 'DONE',
+ tests: 'DONE',
+ },
+];
+
+export const hrefRules = [
+ {
+ pattern: 'Should have a role link.',
+ status: 'DONE',
+ tests: 'DONE',
+ },
+ {
+ pattern: 'Should have cursor: pointer.',
+ status: 'DONE',
+ tests: 'N/A',
+ },
+ {
+ pattern:
+ 'Should cause the user agent to navigate to a new resource.',
+ status: 'DONE',
+ tests: 'N/A',
+ },
+ {
+ pattern:
+ 'Should be activated by pressing Enter and mouse click.',
+ status: 'DONE',
+ tests: 'N/A',
+ },
+ {
+ pattern:
+ 'Can have an accessible label (and/or icon) that indicates opening in new tab.',
+ status: 'DONE',
+ tests: 'DONE',
+ },
+];
+
+export default rules;
diff --git a/src/components/buttons/stories/unstyledButton.rules.a11y.ts b/src/components/buttons/stories/unstyledButton.rules.a11y.ts
new file mode 100644
index 000000000..f60841812
--- /dev/null
+++ b/src/components/buttons/stories/unstyledButton.rules.a11y.ts
@@ -0,0 +1,63 @@
+const rules = [
+ {
+ pattern: 'Should have an accessible name.',
+ comment: `Name should be meaningful (ex. "Read more about vitamin C" instead of "Read more") and explain the action
+ (ex. "Search" instead of "Magnifying glass"). aria-label can be used to provide a name.`,
+ status: 'DONE',
+ tests: 'TO DO',
+ },
+ {
+ pattern: 'Should have a role button.',
+ status: 'DONE',
+ tests: 'TO DO',
+ },
+ {
+ pattern: 'Should be focusable and tabable.',
+ status: 'DONE',
+ tests: 'TO DO',
+ },
+ {
+ pattern: 'Should have cursor: default.',
+ status: 'DONE',
+ tests: 'N/A',
+ },
+ {
+ pattern:
+ 'Should fire onClick on Space/Enter press and mouse click.',
+ status: 'DONE',
+ tests: 'TO DO',
+ },
+ {
+ pattern: 'Should have a proper type.',
+ status: 'DONE',
+ tests: 'TO DO',
+ },
+ {
+ pattern: 'Should have a non-color indicator.',
+ comment: 'To be implemented by the developer',
+ status: 'N/A',
+ tests: 'N/A',
+ },
+ {
+ pattern:
+ 'Should have a color indicator with 4.5:1 contrast ratio to the background.',
+ comment: 'To be implemented by the developer',
+ status: 'N/A',
+ tests: 'N/A',
+ },
+ {
+ pattern:
+ 'Should have a color indicator with 3:1 contrast ratio to the surrounding background.',
+ comment: 'To be implemented by the developer',
+ status: 'N/A',
+ tests: 'N/A',
+ },
+ {
+ pattern: 'Should have a visible disabled state.',
+ comment: 'To be implemented by the developer',
+ status: 'N/A',
+ tests: 'N/A',
+ },
+];
+
+export default rules;
diff --git a/src/sass/main.scss b/src/sass/main.scss
index d3cedab61..b22601c72 100644
--- a/src/sass/main.scss
+++ b/src/sass/main.scss
@@ -28,6 +28,7 @@ $sgFontsPath: 'fonts/' !default;
@import '../components/buttons/buttons';
@import '../components/buttons/buttons_solid_round';
@import '../components/buttons/buttons_unstyled';
+@import '../components/buttons/buttons_lite';
@import '../components/icon-as-button/icon-as-button';
@import '../components/form-elements/radio/radio';
@import '../components/form-elements/radio/radio-group';