Skip to content

Commit

Permalink
Add missing aria label to the file browser
Browse files Browse the repository at this point in the history
  • Loading branch information
trungleduc authored Sep 18, 2024
1 parent 7d58496 commit e6df4b1
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions packages/docprovider-extension/src/filebrowser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -243,18 +243,20 @@ export const defaultFileBrowser: JupyterFrontEndPlugin<IDefaultFileBrowser> = {
IRouter,
JupyterFrontEnd.ITreeResolver,
ILabShell,
ISettingRegistry
ISettingRegistry,
ITranslator
],
activate: async (
app: JupyterFrontEnd,
drive: YDrive,
fileBrowserFactory: IFileBrowserFactory,
router: IRouter | null,
tree: JupyterFrontEnd.ITreeResolver | null,
labShell: ILabShell | null
labShell: ILabShell | null,
translator: ITranslator | null
): Promise<IDefaultFileBrowser> => {
const { commands } = app;

const trans = (translator ?? nullTranslator).load('jupyterlab');
app.serviceManager.contents.addDrive(drive);

// Manually restore and load the default file browser.
Expand All @@ -263,6 +265,12 @@ export const defaultFileBrowser: JupyterFrontEndPlugin<IDefaultFileBrowser> = {
restore: false,
driveName: drive.name
});
defaultBrowser.node.setAttribute('role', 'region');
defaultBrowser.node.setAttribute(
'aria-label',
trans.__('File Browser Section')
);

void Private.restoreBrowser(
defaultBrowser,
commands,
Expand Down

0 comments on commit e6df4b1

Please sign in to comment.