@bloom-housing/ui-components 5.1.1-alpha.8 → 5.1.1-alpha.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [5.1.1-alpha.9](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@5.1.1-alpha.8...@bloom-housing/ui-components@5.1.1-alpha.9) (2022-08-22)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * add a11y linting tools and fix errors ([#2974](https://github.com/bloom-housing/bloom/issues/2974)) ([e583d12](https://github.com/bloom-housing/bloom/commit/e583d1283511c83dd48f48f934be9a7794a67e74))
12
+
13
+
14
+
15
+
16
+
6
17
  ## [5.1.1-alpha.8](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@5.1.1-alpha.7...@bloom-housing/ui-components@5.1.1-alpha.8) (2022-08-18)
7
18
 
8
19
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bloom-housing/ui-components",
3
- "version": "5.1.1-alpha.8",
3
+ "version": "5.1.1-alpha.9",
4
4
  "author": "Sean Albert <sean.albert@exygy.com>",
5
5
  "description": "Shared user interface components for Bloom affordable housing system",
6
6
  "homepage": "https://github.com/bloom-housing/bloom/tree/master/shared/ui-components",
@@ -110,5 +110,5 @@
110
110
  "ts-jest": "^26.4.1",
111
111
  "typesafe-actions": "^5.1.0"
112
112
  },
113
- "gitHead": "4d9b251b65009ccfb30a4e16693453ad4267f914"
113
+ "gitHead": "b9ed99bd1b58d8057bae8782616aa43f53f1294e"
114
114
  }
@@ -39,9 +39,9 @@ const moreLessButton = (
39
39
  }
40
40
 
41
41
  return (
42
- <span className={classes.join(" ")} onClick={() => setExpanded(!expanded)}>
42
+ <button className={classes.join(" ")} onClick={() => setExpanded(!expanded)}>
43
43
  {expanded ? strings?.readLess : strings?.readMore}
44
- </span>
44
+ </button>
45
45
  )
46
46
  }
47
47
 
@@ -26,6 +26,10 @@
26
26
  cursor: pointer;
27
27
  }
28
28
 
29
+ .media-card__header-container {
30
+ width: 100%;
31
+ }
32
+
29
33
  .media-card__icon-container {
30
34
  display: flex;
31
35
  justify-content: center;
@@ -16,13 +16,17 @@ const MediaCard = (props: MediaCardProps) => {
16
16
  if (props.className) wrapperClasses.push(props.className)
17
17
  return (
18
18
  <div className={wrapperClasses.join(" ")}>
19
- <span onClick={props.handleClick}>
19
+ <button
20
+ onClick={props.handleClick}
21
+ className={"media-card__header-container"}
22
+ aria-label={"Launch video"}
23
+ >
20
24
  <div className="media-card__header">
21
25
  <div className="media-card__icon-container">
22
26
  <Icon symbol={props.icon ?? faCirclePlay} size="2xl" fill="white" />
23
27
  </div>
24
28
  </div>
25
- </span>
29
+ </button>
26
30
  <div className="media-card__body">
27
31
  <h3 className="media-card__title">{props.title}</h3>
28
32
  <div className={"media-card__subtitle"}>{props.subtitle}</div>
@@ -13,6 +13,7 @@ const Form = ({ id, children, className, onSubmit }: FormProps) => {
13
13
  }
14
14
 
15
15
  return (
16
+ // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
16
17
  <form id={id} className={className} onSubmit={onSubmit} onKeyPress={onKeyPress} noValidate>
17
18
  {children}
18
19
  </form>
@@ -104,7 +104,11 @@ const SiteHeader = (props: SiteHeaderProps) => {
104
104
  return (
105
105
  <>
106
106
  {option.iconSrc && isDesktop && (
107
- <img src={option.iconSrc} className={option.iconClassName} />
107
+ <img
108
+ src={option.iconSrc}
109
+ className={option.iconClassName}
110
+ alt={`${option.title} icon`}
111
+ />
108
112
  )}
109
113
  {option.title}
110
114
  </>
@@ -337,6 +341,7 @@ const SiteHeader = (props: SiteHeaderProps) => {
337
341
  onMouseEnter={() => changeMenuShow(menuLink.title, activeMenus, setActiveMenus)}
338
342
  onMouseLeave={() => changeMenuShow(menuLink.title, activeMenus, setActiveMenus)}
339
343
  data-test-id={`${menuLink.title}-${index}`}
344
+ role={"button"}
340
345
  >
341
346
  {menuContent}
342
347
  </span>
@@ -71,7 +71,7 @@
71
71
  @apply top-0;
72
72
  }
73
73
 
74
- a {
74
+ .progress-nav__item-container {
75
75
  @apply text-black;
76
76
  @apply font-bold;
77
77
  }
@@ -85,13 +85,13 @@
85
85
  @apply top-0;
86
86
  }
87
87
 
88
- a {
88
+ .progress-nav__item-container {
89
89
  @apply pointer-events-none;
90
90
  @apply cursor-default;
91
91
  }
92
92
  }
93
93
 
94
- a {
94
+ .progress-nav__item-container {
95
95
  @apply pt-4;
96
96
  @apply pl-1;
97
97
  @apply text-gray-700;
@@ -27,10 +27,10 @@ const ProgressNavItem = (props: {
27
27
 
28
28
  return (
29
29
  <li className={`progress-nav__item ${bgColor}`}>
30
- <a aria-disabled={bgColor === "is-disabled"} href={"#"}>
30
+ <span aria-disabled={bgColor === "is-disabled"} className={"progress-nav__item-container"}>
31
31
  {srText}
32
32
  {props.label}
33
- </a>
33
+ </span>
34
34
  </li>
35
35
  )
36
36
  }
@@ -39,6 +39,9 @@ const OverlayInner = (props: OverlayProps) => {
39
39
  onClick={(e) => {
40
40
  if (e.target === e.currentTarget) closeHandler()
41
41
  }}
42
+ onKeyPress={(e) => {
43
+ if (e.key === "Escape") closeHandler()
44
+ }}
42
45
  >
43
46
  <div className={`fixed-overlay__inner ${props.slim ? "fixed-overlay__inner-slim" : ""}`}>
44
47
  <FocusLock>{props.children}</FocusLock>
@@ -95,9 +95,9 @@ const FormForgotPassword = ({
95
95
  </Button>
96
96
  </div>
97
97
  <div className="text-center mt-6">
98
- <a href="#" onClick={() => router.back()}>
98
+ <Button onClick={() => router.back()} unstyled={true}>
99
99
  {t("t.cancel")}
100
- </a>
100
+ </Button>
101
101
  </div>
102
102
  </section>
103
103
  </Form>
@@ -1,4 +1,4 @@
1
- import React, { useState, useCallback, useEffect, useMemo } from "react"
1
+ import React, { useState, useCallback, useEffect } from "react"
2
2
  import "mapbox-gl/dist/mapbox-gl.css"
3
3
  import MapGL, { Marker } from "react-map-gl"
4
4
 
@@ -1,5 +1,5 @@
1
1
  import * as React from "react"
2
- import { Heading, HeaderType, HeadingProps } from "../../../headers/Heading"
2
+ import { Heading, HeadingProps } from "../../../headers/Heading"
3
3
 
4
4
  export interface SidebarBlockProps extends Omit<HeadingProps, "children" | "className"> {
5
5
  children: React.ReactNode
@@ -88,7 +88,7 @@ const FormSignIn = ({
88
88
 
89
89
  <aside className="float-right text-tiny font-semibold">
90
90
  <LinkComponent href="/forgot-password">
91
- <a>{t("authentication.signIn.forgotPassword")}</a>
91
+ {t("authentication.signIn.forgotPassword")}
92
92
  </LinkComponent>
93
93
  </aside>
94
94
 
@@ -31,7 +31,7 @@ export type FormSignInMFAControl = {
31
31
  const FormSignInMFAType = ({
32
32
  onSubmit,
33
33
  networkError,
34
- control: { errors, register, handleSubmit, setValue },
34
+ control: { errors, register, handleSubmit },
35
35
  emailOnClick,
36
36
  smsOnClick,
37
37
  }: FormSignInMFAProps) => {
@@ -22,7 +22,6 @@ const GridCell = (props: GridCellProps) => {
22
22
 
23
23
  export interface GridSectionProps {
24
24
  title?: React.ReactNode
25
- edit?: string
26
25
  subtitle?: string
27
26
  description?: string
28
27
  tinted?: boolean
@@ -67,11 +66,6 @@ const GridSection = (props: GridSectionProps) => {
67
66
  {(props.title || props.subtitle) && (
68
67
  <header className={headerClasses.join(" ")}>
69
68
  {props.title && <h2 className="grid-section__title">{props.title}</h2>}
70
- {props.edit && (
71
- <span className="ml-auto">
72
- <a className="edit-link">{props.edit}</a>
73
- </span>
74
- )}
75
69
  {props.subtitle && <h3 className={subtitleClasses.join(" ")}>{props.subtitle}</h3>}
76
70
  {props.description && (
77
71
  <span className={"grid-section__description"}>{props.description}</span>