Skip to content

Commit 7ee7525

Browse files
author
Michael Dijkstra
authored
Merge pull request #103 from calibreapp/add-aria-labels-to-all-providers
Add aria labels to all providers
2 parents 1ea707c + df7a8b5 commit 7ee7525

5 files changed

Lines changed: 35 additions & 10 deletions

File tree

src/components/Chatwoot/index.tsx

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ const styles: {
2525
width: '24px'
2626
},
2727
close: {
28-
backgroundColor: "#fff",
29-
height: "24px",
30-
left: "32px",
31-
position: "absolute",
32-
top: "20px",
33-
width: "2px",
28+
backgroundColor: '#fff',
29+
height: '24px',
30+
left: '32px',
31+
position: 'absolute',
32+
top: '20px',
33+
width: '2px'
3434
}
3535
}
3636

@@ -46,6 +46,9 @@ const Provider = ({ color }: Props): JSX.Element | null => {
4646
return (
4747
<div>
4848
<div
49+
aria-label="Load Chat"
50+
aria-busy="true"
51+
aria-live="polite"
4952
onClick={() => loadChat({ open: true })}
5053
onMouseEnter={() => loadChat({ open: false })}
5154
style={{
@@ -61,8 +64,8 @@ const Provider = ({ color }: Props): JSX.Element | null => {
6164
/>
6265
) : (
6366
<>
64-
<div style={{ ...styles.close, transform: "rotate(45deg)" }} />
65-
<div style={{ ...styles.close, transform: "rotate(-45deg)" }} />
67+
<div style={{ ...styles.close, transform: 'rotate(45deg)' }} />
68+
<div style={{ ...styles.close, transform: 'rotate(-45deg)' }} />
6669
</>
6770
)}
6871
</div>

src/components/Drift/index.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ const Drift = ({
7575
<div style={positionStyles}>
7676
<div style={styles.container}>
7777
<div
78+
aria-label="Load Chat"
79+
aria-busy="true"
80+
aria-live="polite"
7881
onClick={() => loadChat({ open: true })}
7982
onMouseEnter={() => loadChat({ open: false })}
8083
style={{

src/components/Intercom/index.tsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,9 @@ const Intercom = ({ color }: Props): JSX.Element | null => {
108108
>
109109
<div style={styles.region}>
110110
<div
111+
aria-label="Load Chat"
112+
aria-busy="true"
113+
aria-live="polite"
111114
onClick={() => loadChat({ open: true })}
112115
onMouseEnter={() => loadChat({ open: false })}
113116
style={styles.launcher}
@@ -138,7 +141,13 @@ const Intercom = ({ color }: Props): JSX.Element | null => {
138141
transform: state === 'initial' ? 'rotate(-30deg)' : 'rotate(0deg)'
139142
}}
140143
>
141-
<svg focusable="false" viewBox="0 0 16 14" width="28" height="25" style={{ width : '16px' }}>
144+
<svg
145+
focusable="false"
146+
viewBox="0 0 16 14"
147+
width="28"
148+
height="25"
149+
style={{ width: '16px' }}
150+
>
142151
<path
143152
fill="rgb(255, 255, 255)"
144153
fillRule="evenodd"

src/components/Messenger/index.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,11 @@ const CustomerChat = memo(
5757
greeting_dialog_delay: greetingDialogDelay
5858
}
5959

60-
return <div><div className="fb-customerchat" {...fields} /></div>
60+
return (
61+
<div>
62+
<div className="fb-customerchat" {...fields} />
63+
</div>
64+
)
6165
}
6266
)
6367

@@ -71,6 +75,9 @@ const Widget = ({ color }: { color: string }): JSX.Element | null => {
7175
return (
7276
<div
7377
style={styles}
78+
aria-label="Load Chat"
79+
aria-busy="true"
80+
aria-live="polite"
7481
onClick={() => loadChat({ open: true })}
7582
onMouseEnter={() => loadChat({ open: false })}
7683
>

src/components/Userlike/index.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@ const Userlike = ({
6868
return (
6969
<div style={{ ...styles.container, ...positionStyles, ...shapeStyle }}>
7070
<button
71+
aria-label="Load Chat"
72+
aria-busy="true"
73+
aria-live="polite"
7174
onClick={() => loadChat({ open: true })}
7275
onMouseEnter={() => loadChat({ open: false })}
7376
style={{

0 commit comments

Comments
 (0)