Skip to content

Commit d12ce75

Browse files
Pill in listbox: Make aria-selected always true
1 parent d209d2e commit d12ce75

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

components/utilities/pill/index.jsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */
22
/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
33

4+
/**
5+
* This Pill component should be used within a listbox and differs from the standalone Pill component which is typically used for actions (such as a link) and not form fields. This component should be used in conjuction with `PillContainer`.
6+
*/
47
import React from 'react';
58
import PropTypes from 'prop-types';
69

@@ -14,7 +17,7 @@ import SLDSPill from '../../../components/pill';
1417

1518
const propTypes = {
1619
/**
17-
* Pill is the active pill within a pill container. This will request focus on the DOM node.
20+
* Pill is the actively focused pill within a pill container. This will request focus on the DOM node.
1821
*/
1922
active: PropTypes.bool,
2023
/**
@@ -133,7 +136,7 @@ const Pill = (props) => {
133136
assistiveText={{
134137
remove: assistiveText.remove,
135138
}}
136-
aria-selected={props.active}
139+
aria-selected="true"
137140
onBlur={props.events.onBlur}
138141
onClick={
139142
typeof props.events.onClick === 'function'

0 commit comments

Comments
 (0)