Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix accessibility issues found by the application test. #10737

Merged
merged 1 commit into from
Jan 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 13 additions & 30 deletions components/frontend/public/index.html
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="theme-color" content="#000000">
<!--
manifest.json provides metadata used when your web app is added to the
homescreen on Android. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json">
<!--
<head>
<meta charset="utf-8" />
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<meta name="theme-color" content="#000000" />
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.
Expand All @@ -19,22 +15,9 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>Quality-time</title>
</head>
<body>
<noscript>
You need to enable JavaScript to run this app.
</noscript>
<div id="root"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.

You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.

To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
<title>Quality-time</title>
</head>
<body id="root">
<noscript> You need to enable JavaScript to run this app. </noscript>
</body>
</html>
2 changes: 0 additions & 2 deletions components/frontend/src/AppUI.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { LocalizationProvider } from "@mui/x-date-pickers"
import { AdapterDayjs } from "@mui/x-date-pickers/AdapterDayjs"
import { bool, func, number, object, string } from "prop-types"
import HashLinkObserver from "react-hash-link"
import { ToastContainer } from "react-toastify"

import { useSettings } from "./app_ui_settings"
import { DataModel } from "./context/DataModel"
Expand Down Expand Up @@ -87,7 +86,6 @@ export function AppUI({
setUIMode={setMode}
uiMode={mode}
/>
<ToastContainer theme="colored" />
<Permissions.Provider value={user_permissions}>
<DataModel.Provider value={dataModel}>
<PageContent
Expand Down
3 changes: 3 additions & 0 deletions components/frontend/src/PageContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Box, Container } from "@mui/material"
import CircularProgress from "@mui/material/CircularProgress"
import { bool, func, number, string } from "prop-types"
import { useEffect, useState } from "react"
import { ToastContainer } from "react-toastify"

import { get_measurements } from "./api/measurement"
import { Report } from "./report/Report"
Expand Down Expand Up @@ -117,6 +118,7 @@ export function PageContent({
}
return (
<Container
component="main"
disableGutters
maxWidth={false}
sx={{
Expand All @@ -132,6 +134,7 @@ export function PageContent({
marginRight: "0px",
}}
>
<ToastContainer theme="colored" />
{content}
</Container>
)
Expand Down
4 changes: 4 additions & 0 deletions docs/src/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ If your currently installed *Quality-time* version is not the latest version, pl

## [Unreleased]

### Fixed

- Fix accessibility issues found by the application test. Fixes [#6354](https://github.com/ICTU/quality-time/issues/6354).

### Changed

- Use the font configured in the browser instead of the browser's system font. Fixes [#9864](https://github.com/ICTU/quality-time/issues/9864).
Expand Down
3 changes: 1 addition & 2 deletions tests/application_tests/src/test_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,5 @@ def test_report_axe_accessibility(self):
self.fail("Could not write axe violations report")

# If there are more violations than expected, output the human readable report
# Fixing the axe violations is on the backlog: https://github.com/ICTU/quality-time/issues/6354
current_number_of_axe_violations = 7
current_number_of_axe_violations = 0
self.assertLessEqual(len(violation_results), current_number_of_axe_violations, human_readable_axe_report)