(frontend) leftpanel and grid modified
- Read the Tooltip with the number of participants, not the icon - In LeftPanel, when navigating with tab, we can see where we are
This commit is contained in:
@@ -54,6 +54,9 @@ export const DocsGridItem = ({ doc }: DocsGridItemProps) => {
|
||||
$css={css`
|
||||
flex: ${flexLeft};
|
||||
align-items: center;
|
||||
&:focus {
|
||||
outline: 2px solidrgb(33, 34, 82);
|
||||
}
|
||||
`}
|
||||
href={`/docs/${doc.id}`}
|
||||
>
|
||||
@@ -79,7 +82,11 @@ export const DocsGridItem = ({ doc }: DocsGridItemProps) => {
|
||||
>
|
||||
<Tooltip
|
||||
content={
|
||||
<Text $textAlign="center" $variation="000">
|
||||
<Text
|
||||
id={`tooltip-access-${doc.id}`}
|
||||
$textAlign="center"
|
||||
$variation="000"
|
||||
>
|
||||
{isPublic
|
||||
? t('Accessible to anyone')
|
||||
: t('Accessible to authenticated users')}
|
||||
@@ -87,12 +94,17 @@ export const DocsGridItem = ({ doc }: DocsGridItemProps) => {
|
||||
}
|
||||
placement="top"
|
||||
>
|
||||
<div>
|
||||
<div
|
||||
role="button"
|
||||
tabIndex={0}
|
||||
aria-labelledby={`tooltip-access-${doc.id}`}
|
||||
>
|
||||
<Icon
|
||||
$theme="greyscale"
|
||||
$variation="600"
|
||||
$size="14px"
|
||||
iconName={isPublic ? 'public' : 'vpn_lock'}
|
||||
aria-hidden="true"
|
||||
/>
|
||||
</div>
|
||||
</Tooltip>
|
||||
|
||||
+14
-3
@@ -9,6 +9,7 @@ type Props = {
|
||||
doc: Doc;
|
||||
handleClick: () => void;
|
||||
};
|
||||
|
||||
export const DocsGridItemSharedButton = ({ doc, handleClick }: Props) => {
|
||||
const { t } = useTranslation();
|
||||
const sharedCount = doc.nb_accesses;
|
||||
@@ -18,11 +19,15 @@ export const DocsGridItemSharedButton = ({ doc, handleClick }: Props) => {
|
||||
return <Box $minWidth="50px"> </Box>;
|
||||
}
|
||||
|
||||
const tooltipContent = t('Shared with {{count}} users', {
|
||||
count: sharedCount,
|
||||
});
|
||||
|
||||
return (
|
||||
<Tooltip
|
||||
content={
|
||||
<Text $textAlign="center" $variation="000">
|
||||
{t('Shared with {{count}} users', { count: sharedCount })}
|
||||
<Text $variation="000" $textAlign="center">
|
||||
{tooltipContent}
|
||||
</Text>
|
||||
}
|
||||
placement="top"
|
||||
@@ -36,8 +41,14 @@ export const DocsGridItemSharedButton = ({ doc, handleClick }: Props) => {
|
||||
}}
|
||||
color="tertiary"
|
||||
size="nano"
|
||||
icon={<Icon $variation="800" $theme="primary" iconName="group" />}
|
||||
aria-label={tooltipContent} // Lecture directe pour les lecteurs d'écran
|
||||
>
|
||||
<Icon
|
||||
$variation="800"
|
||||
$theme="primary"
|
||||
iconName="group"
|
||||
aria-hidden="true" // Empêche la lecture de l'icône
|
||||
/>
|
||||
{sharedCount}
|
||||
</Button>
|
||||
</Tooltip>
|
||||
|
||||
+5
-1
@@ -52,6 +52,7 @@ export const LeftPanelTargetFilters = () => {
|
||||
|
||||
return (
|
||||
<Box
|
||||
role="tablist"
|
||||
$justify="center"
|
||||
$padding={{ horizontal: 'sm' }}
|
||||
$gap={spacing['2xs']}
|
||||
@@ -61,7 +62,7 @@ export const LeftPanelTargetFilters = () => {
|
||||
|
||||
return (
|
||||
<BoxButton
|
||||
aria-label={query.label}
|
||||
role="tab"
|
||||
key={query.label}
|
||||
onClick={() => onSelectQuery(query.targetQuery)}
|
||||
$direction="row"
|
||||
@@ -80,6 +81,9 @@ export const LeftPanelTargetFilters = () => {
|
||||
&:hover {
|
||||
background-color: ${colors['greyscale-100']};
|
||||
}
|
||||
&:focus {
|
||||
outline: 2px solid #007aff;
|
||||
}
|
||||
`}
|
||||
>
|
||||
<Icon
|
||||
|
||||
Reference in New Issue
Block a user