Skip to content

Commit

Permalink
fix accessibility issues
Browse files Browse the repository at this point in the history
  • Loading branch information
imolorhe committed Feb 12, 2025
1 parent f34ef41 commit 7a7838b
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Injectable } from '@angular/core';
import { HotToastService } from '@ngneat/hot-toast';
import { ToastrService, ActiveToast, IndividualConfig } from 'ngx-toastr';
import { isExtension } from '../../utils';
import { isExtension } from 'altair-graphql-core/build/crx';
import { Store } from '@ngrx/store';
import * as fromRoot from '../../store';
import { IDictionary } from '../../interfaces/shared';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
import { debug } from '../../utils/logger';
import { environment } from 'environments/environment';
import { EvaluatorWorkerClient } from './evaluator-worker-client';
import { isExtension } from '../../utils';
import { isExtension } from 'altair-graphql-core/build/crx';
import { getAltairConfig } from 'altair-graphql-core/build/config';

export class EvaluatorFrameClient extends ScriptEvaluatorClient {
Expand Down
4 changes: 1 addition & 3 deletions packages/altair-app/src/app/modules/altair/utils/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import FileSaver from 'file-saver';
import JSONBigint from 'json-bigint';
import isElectron from 'altair-graphql-core/build/utils/is_electron';
import { isExtension, isFirefoxExtension } from 'altair-graphql-core/build/crx';
import { debug } from './logger';
import { IDictionary } from '../interfaces/shared';
import fileDialog from 'file-dialog';
Expand Down Expand Up @@ -119,9 +120,6 @@ export const openFiles = async (opts: FileDialogOptions = {}) => {
}
};

export const isExtension = !!window.chrome?.runtime?.id;
export const isFirefoxExtension = location.protocol === 'moz-extension:';

export const detectEnvironment = () => {
if (isElectron) {
return 'electron';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ export const TableDetails: React.FC<TableDetailsProps> = ({ request, onClose })
cursor: 'pointer',
}}
onClick={() => onClose()}
onKeyDown={(e) => {
if (e.key === 'Enter') {
onClose();
}
}}
>
&#x2715;
</span>
Expand Down
5 changes: 5 additions & 0 deletions packages/altair-crx/src/components/table-list/table-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,11 @@ export const TableList: React.FC<TableListProps> = ({ requests }) => {
{header.isPlaceholder ? null : (
<div
onClick={header.column.getToggleSortingHandler()}
onKeyDown={(e) => {
if (e.key === 'Enter') {
header.column.toggleSorting();
}
}}
title={
header.column.getCanSort()
? header.column.getNextSortingOrder() === 'asc'
Expand Down

0 comments on commit 7a7838b

Please sign in to comment.