Skip to content

Commit dd6abcb

Browse files
committed
OpenConceptLab/ocl_issues#2486 | Actions menu aria-label
1 parent 0444eb4 commit dd6abcb

1 file changed

Lines changed: 14 additions & 3 deletions

File tree

src/components/map-projects/MapProjects.jsx

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,9 +208,17 @@ const MapProjects = () => {
208208
</TableCell>
209209
<TableCell align='right'>
210210
<Tooltip title={t('common.more_actions')}>
211-
<IconButton color='secondary' size='small' onClick={event => openActionMenu(event, project)}>
212-
<MoreVertIcon fontSize='small' />
213-
</IconButton>
211+
<IconButton
212+
color='secondary'
213+
size='small'
214+
aria-label={t('common.more_actions')}
215+
aria-haspopup='menu'
216+
aria-controls={actionMenuAnchorEl ? 'map-project-actions-menu' : undefined}
217+
aria-expanded={actionMenuAnchorEl ? 'true' : undefined}
218+
onClick={event => openActionMenu(event, project)}
219+
>
220+
<MoreVertIcon fontSize='small' />
221+
</IconButton>
214222
</Tooltip>
215223
</TableCell>
216224
</TableRow>
@@ -220,10 +228,13 @@ const MapProjects = () => {
220228
</Table>
221229
</TableContainer>
222230
<Menu
231+
id='map-project-actions-menu'
223232
anchorEl={actionMenuAnchorEl}
224233
open={Boolean(actionMenuAnchorEl)}
225234
onClose={closeActionMenu}
226235
onClick={event => event.stopPropagation()}
236+
anchorOrigin={{ vertical: 'bottom', horizontal: 'right' }}
237+
transformOrigin={{ vertical: 'top', horizontal: 'right' }}
227238
>
228239
<MenuItem onClick={onMenuCopyClick}>
229240
<ListItemIcon><ContentCopy fontSize="small" /></ListItemIcon>

0 commit comments

Comments
 (0)