Commit Graph

5 Commits

Author SHA1 Message Date
Joy Serquiña
8a766ce354
fix(Flutter Web App): fixes html lang typo (#151866)
Updates the html tag lang attribute to valid "en-US" according to W3.org.

[Before screenshot](https://screenshot.googleplex.com/CMEvi8nAofR4twf)
[After screenshot](https://screenshot.googleplex.com/5aJZBc6o5Xm9fXH)

Fixes b/338044851

*Replace this paragraph with a description of what this PR is changing or adding, and why. Consider including before/after screenshots.*

*List which issues are fixed by this PR. You must list at least one issue. An issue is not required if the PR fixes something trivial like a typo.*

*If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].*
2024-07-17 17:58:53 +00:00
Yegor
fe07fb4eba
fix heading level absorption, diagnostics; add tests and an a11y use-case (#151421)
Multiple fixes related to heading levels:

* Fix heading level absorption. Heading level would get erased when a semantics config is absorbed into another. With this change the highest heading level wins.
* Add `headingLevel` to the diagnostics of `SemanticsNode`.
* Add unit-tests for heading levels.
* Add an a11y use-case for headings.

Improves https://github.com/flutter/flutter/issues/46789 and general accessibility of headings.
2024-07-10 05:11:38 +00:00
Yegor
ba6302e2d5
add lang attribute to the a11y_assessments app (#147586)
Since the app is used to assess Flutter's overall accessibility, the app
should follow at many guidelines as possible, including setting the
`lang` attribute.

Fixes b/338044851
2024-05-01 10:29:17 -07:00
Jackson Gardner
3c30e3cb20
Flutter Web Bootstrapping Improvements (#144434)
This makes several changes to flutter web app bootstrapping.
* The build now produces a `flutter_bootstrap.js` file.
  * By default, this file does the basic streamlined startup of a flutter app with the service worker settings and no user configuration.
  * The user can also put a `flutter_bootstrap.js` file in the `web` subdirectory in the project directory which can have whatever custom bootstrapping logic they'd like to write instead. This file is also templated, and can use any of the tokens  that can be used with the `index.html` (with the exception of `{{flutter_bootstrap_js}}`, see below).
* Introduced a few new templating tokens for `index.html`:
  * `{{flutter_js}}` => inlines the entirety of `flutter.js`
  * `{{flutter_service_worker_version}}` => replaced directly by the service worker version. This can be used instead of the script that sets the `serviceWorkerVersion` local variable that we used to have by default.
  * `{{flutter_bootstrap_js}}` => inlines the entirety of `flutter_bootstrap.js` (this token obviously doesn't apply to `flutter_bootstrap.js` itself).
* Changed `IndexHtml` to be called `WebTemplate` instead, since it is used for more than just the index.html now.
* We now emit warnings at build time for certain deprecated flows:
  * Warn on the old service worker version pattern (i.e.`(const|var) serviceWorkerVersion = null`) and recommends using `{{flutter_service_worker_version}}` token instead
  * Warn on use of `FlutterLoader.loadEntrypoint` and recommend using `FlutterLoader.load` instead
  * Warn on manual loading of `flutter_service_worker.js`.
* The default `index.html` on `flutter create` now uses an async script tag with `flutter_bootstrap.js`.
2024-03-12 22:41:26 +00:00
chunhtai
3d74b0b737
Adds a11y assessment sample app (#131716)
This app will be use for a11y assessments. See [design doc](http://go/flutter-gar-reporting-q3-2023)    (internal only)
2023-08-03 16:15:14 +00:00