Skip to content

Commit e52d413

Browse files
committed
Added accessibility suggestions
1 parent 69fd947 commit e52d413

1 file changed

Lines changed: 60 additions & 13 deletions

File tree

packages/module/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotHeaderDrawerWithPin.tsx

Lines changed: 60 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,28 +9,75 @@ import { ThumbtackIcon } from '@patternfly/react-icons';
99

1010
// Sample conversations
1111
const initialConversations: { [key: string]: Conversation[] } = {
12-
Today: [{ id: '1', text: 'Red Hat products and services' }],
12+
Today: [
13+
{
14+
id: '1',
15+
text: 'Red Hat products and services',
16+
label: 'Conversation options for "Red Hat products and services"'
17+
}
18+
],
1319
'This month': [
1420
{
1521
id: '2',
16-
text: 'Enterprise Linux installation and setup'
22+
text: 'Enterprise Linux installation and setup',
23+
label: 'Conversation options for "Enterprise Linux installation and setup"'
1724
},
18-
{ id: '3', text: 'Troubleshoot system crash' }
25+
{
26+
id: '3',
27+
text: 'Troubleshoot system crash',
28+
label: 'Conversation options for "Troubleshoot system crash"'
29+
}
1930
],
2031
March: [
21-
{ id: '4', text: 'Ansible security and updates' },
22-
{ id: '5', text: 'Red Hat certification' },
23-
{ id: '6', text: 'Lightspeed user documentation' }
32+
{
33+
id: '4',
34+
text: 'Ansible security and updates',
35+
label: 'Conversation options for "Ansible security and updates"'
36+
},
37+
{
38+
id: '5',
39+
text: 'Red Hat certification',
40+
label: 'Conversation options for "Red Hat certification"'
41+
},
42+
{
43+
id: '6',
44+
text: 'Lightspeed user documentation',
45+
label: 'Conversation options for "Lightspeed user documentation"'
46+
}
2447
],
2548
February: [
26-
{ id: '7', text: 'Crashing pod assistance' },
27-
{ id: '8', text: 'OpenShift AI pipelines' },
28-
{ id: '9', text: 'Updating subscription plan' },
29-
{ id: '10', text: 'Red Hat licensing options' }
49+
{
50+
id: '7',
51+
text: 'Crashing pod assistance',
52+
label: 'Conversation options for "Crashing pod assistance"'
53+
},
54+
{
55+
id: '8',
56+
text: 'OpenShift AI pipelines',
57+
label: 'Conversation options for "OpenShift AI pipelines"'
58+
},
59+
{
60+
id: '9',
61+
text: 'Updating subscription plan',
62+
label: 'Conversation options for "Updating subscription plan"'
63+
},
64+
{
65+
id: '10',
66+
text: 'Red Hat licensing options',
67+
label: 'Conversation options for "Red Hat licensing options"'
68+
}
3069
],
3170
January: [
32-
{ id: '11', text: 'RHEL system performance' },
33-
{ id: '12', text: 'Manage user accounts' }
71+
{
72+
id: '11',
73+
text: 'RHEL system performance',
74+
label: 'Conversation options for "RHEL system performance"'
75+
},
76+
{
77+
id: '12',
78+
text: 'Manage user accounts',
79+
label: 'Conversation options for "Manage user accounts"'
80+
}
3481
]
3582
};
3683

@@ -56,7 +103,7 @@ export const ChatbotHeaderPinDemo: FunctionComponent = () => {
56103
const isPinned = pinnedConversations.has(conversationId);
57104

58105
return [
59-
<DropdownList key={`${conversationId}-menu`}>
106+
<DropdownList key={`${conversationId}-menu`} aria-label="Conversation options">
60107
<DropdownItem
61108
value={isPinned ? 'Unpin' : 'Pin'}
62109
id={isPinned ? 'Unpin' : 'Pin'}

0 commit comments

Comments
 (0)