Skip to content

Commit 19cb3e0

Browse files
(SalesPath): improve a11y
1 parent 6168fae commit 19cb3e0

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/scripts/SalesPath.tsx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,9 @@ export const SalesPathItem: FC<SalesPathItemProps> = (props) => {
7676
<li className={pathItemClassName} role='presentation'>
7777
<a
7878
className='slds-path__link'
79-
aria-selected='false'
79+
aria-selected={isActive}
8080
tabIndex={tabIndex}
81-
role='tab'
82-
aria-live='assertive'
81+
role='option'
8382
onClick={onItemClick}
8483
>
8584
<span className='slds-path__stage'>
@@ -149,14 +148,18 @@ export const SalesPath = createFC<
149148
const ctx = useMemo(() => ({ onSelect, activeKey }), [onSelect, activeKey]);
150149

151150
return (
152-
<div className={salesPathClassNames} role='application tablist'>
151+
<div className={salesPathClassNames}>
153152
<div className={classnames('slds-grid', 'slds-path__track')}>
154153
<div
155154
className={classnames('slds-grid', 'slds-path__scroller-container')}
156155
>
157156
<div className='slds-path__scroller'>
158157
<div className='slds-path__scroller_inner'>
159-
<ul className='slds-path__nav' role='presentation'>
158+
<ul
159+
className='slds-path__nav'
160+
role='listbox'
161+
aria-orientation='horizontal'
162+
>
160163
<SalesPathContext.Provider value={ctx}>
161164
{React.Children.map(children, (child, idx) => {
162165
const evaluatedType =

0 commit comments

Comments
 (0)