Skip to content

Commit

Permalink
adding alt attributes to img tags (dart-lang#5363)
Browse files Browse the repository at this point in the history
Thanks for your contribution! Please replace this text with a
description of what this PR is changing or adding and why, list any
relevant issues, and review the contribution guidelines below.



---

- [ Yes ] I’ve reviewed the contributor guide and applied the relevant
portions to this PR.
- [ Yes ] This PR doesn’t contain automatically generated corrections or
text (Grammarly, LLMs, and similar).
- [ Yes ] This PR follows the [Google Developer Documentation Style
Guidelines](https://developers.google.com/style) — for example, it
doesn’t use _i.e._ or _e.g._, and it avoids _I_ and _we_ (first person).

<details>
  <summary>Contribution guidelines:</summary><br>

- See our [contributor
guide](https://github.com/dart-lang/site-www/blob/main/CONTRIBUTING.md)
for general expectations for PRs.
- Larger or significant changes should be discussed in an issue before
creating a PR.
- Code changes should generally follow the [Dart style
guide](https://dart.dev/effective-dart) and use `dart format`.
- Updates to [code
excerpts](https://github.com/dart-lang/site-shared/blob/main/doc/code-excerpts.md)
indicated by `<?code-excerpt` need to be updated in their source `.dart`
file as well.
</details>
  • Loading branch information
GsnMithra authored and atsansone committed Jan 26, 2024
1 parent 7d38979 commit a535f07
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 22 deletions.
34 changes: 17 additions & 17 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
type='video/webm;codecs="vp8, vorbis"' />
<source src="assets/dash/video/hotreload.mp4"
type='video/mp4;codecs="avc1.42E01E, mp4a.40.2"' />
<img src=assets/dash/2x/paint-your-ui.png />
<img src=assets/dash/2x/paint-your-ui.png alt="Paint your UI" />
</video>
</section>
</div>

<section class="dash-header d-sm-block d-md-none">
<img src="assets/dash/2x/paint-your-ui.png"/>
<img src="assets/dash/2x/paint-your-ui.png" alt="Paint your UI to life"/>
</section>

<!-- Dart tag-line -->
Expand Down Expand Up @@ -52,7 +52,7 @@
<div class="row">
<div class="col-md-4 col-sm-12">
<div class="feature">
<div class="feature-icon"><img src="assets/dash/2x/multiplatform performance light [email protected]"/></div>
<div class="feature-icon"><img src="assets/dash/2x/multiplatform performance light [email protected]" alt="Multiplatform performance"/></div>
<div class="feature-title">Optimized<br/>for UI</div>
<div class="feature-desc">Develop with a programming language
specialized around the needs of user interface creation
Expand All @@ -61,7 +61,7 @@
</div>
<div class="col-md-4 col-sm-12">
<div class="feature">
<div class="feature-icon"><img src="assets/dash/2x/client optimised light [email protected]"/></div>
<div class="feature-icon"><img src="assets/dash/2x/client optimised light [email protected]" alt="Client optimised"/></div>
<div class="feature-title">Productive</br>development</div>
<div class="feature-desc">Make changes iteratively: use hot
reload to see the result instantly in your running app
Expand All @@ -70,7 +70,7 @@
</div>
<div class="col-md-4 col-sm-12">
<div class="feature">
<div class="feature-icon"><img src="assets/dash/2x/productive dev light [email protected]"/></div>
<div class="feature-icon"><img src="assets/dash/2x/productive dev light [email protected]" alt="Productive development"/></div>
<div class="feature-title">Fast on all<br/>platforms</div>
<div class="feature-desc">Compile to ARM & x64 machine
code for mobile, desktop, and backend. Or compile to JavaScript
Expand All @@ -86,12 +86,12 @@
<div class="dart-dash-details container-fluid d-sm-block d-md-none" tabindex="-1">
<section class="row dash-row">
<div class="col-lg-7 col-md-6 col-sm-12 content-image">
<img class="gallerySix" src="assets/dash/svg/1-1 async await.svg"/>
<img class="gallerySix" src="assets/dash/svg/1-1 async await.svg" alt="Async await functions"/>
</div>
<div class="col-lg-5 col-md-6 col-sm-12 content-info">
<div class="content-container">
<div class="content-icon">
<img src="assets/dash/2x/multiplatform performance light [email protected]"/>
<img src="assets/dash/2x/multiplatform performance light [email protected]" alt="Multiplatform performance"/>
</div>
<div class="content-feature">Optimized for UI</div>
<div class="content-desc" id="gallerySix">
Expand Down Expand Up @@ -141,12 +141,12 @@
</section>
<section class="row dash-row">
<div class="col-lg-7 col-md-6 col-sm-12 content-image">
<img class="galleryFive" src="assets/dash/svg/2-1 hot reload iterative changes.svg"/>
<img class="galleryFive" src="assets/dash/svg/2-1 hot reload iterative changes.svg" alt="Hot reload changes"/>
</div>
<div class="col-lg-5 col-md-6 col-sm-12 content-info">
<div class="content-container">
<div class="content-icon">
<img src="assets/dash/2x/productive dev light [email protected]"/>
<img src="assets/dash/2x/productive dev light [email protected]" alt="Productive development"/>
</div>
<div class="content-feature">Productive Development</div>
<div class="content-desc" id="galleryFive">
Expand Down Expand Up @@ -197,12 +197,12 @@
</section>
<section class="row dash-row">
<div class="col-lg-7 col-md-6 col-sm-12 content-image">
<img class="galleryFour dash-align-left" src="assets/dash/svg/3-1 - aot compile.svg"/>
<img class="galleryFour dash-align-left" src="assets/dash/svg/3-1 - aot compile.svg" alt="Compiling dart file"/>
</div>
<div class="col-lg-5 col-md-6 col-sm-12 content-info">
<div class="content-container">
<div class="content-icon">
<img src="assets/dash/2x/client optimised light [email protected]"/>
<img src="assets/dash/2x/client optimised light [email protected]" alt="Client optimized"/>
</div>
<div class="content-feature">Fast on all platforms</div>
<div class="content-desc" id="galleryFour">
Expand Down Expand Up @@ -252,7 +252,7 @@
<section class="row dash-row">
<div class="col-lg-5 col-md-6 col-sm-12 content-info">
<div class="content-container dash-align-right">
<div class="content-icon"><img src="assets/dash/2x/multiplatform performance light [email protected]"/> </div>
<div class="content-icon"><img src="assets/dash/2x/multiplatform performance light [email protected]" alt="Multiplatform performance"/> </div>
<div class="content-feature">Optimized for UI</div>
<div class="content-desc" id="galleryOne">
<ul class="selector">
Expand Down Expand Up @@ -299,17 +299,17 @@
</div>
</div>
<div class="col-lg-7 col-md-6 col-sm-12 content-image">
<img class="galleryOne dash-align-left" src="assets/dash/svg/1-1 async await.svg"/>
<img class="galleryOne dash-align-left" src="assets/dash/svg/1-1 async await.svg" alt="Async await functions "/>
</div>
</section>

<section class="row dash-row">
<div class="col-lg-7 col-md-6 col-sm-12 content-image">
<img class="galleryTwo dash-align-right" src="assets/dash/svg/2-1 hot reload iterative changes.svg"/>
<img class="galleryTwo dash-align-right" src="assets/dash/svg/2-1 hot reload iterative changes.svg" alt="Hot reload your changes"/>
</div>
<div class="col-lg-5 col-md-6 col-sm-12 content-info">
<div class="content-container dash-align-left">
<div class="content-icon"><img src="assets/dash/2x/productive dev light [email protected]"/></div>
<div class="content-icon"><img src="assets/dash/2x/productive dev light [email protected]" alt="Productive development"/></div>
<div class="content-feature">Productive development</div>
<div class="content-desc" id="galleryTwo">
<ul class="selector">
Expand Down Expand Up @@ -361,7 +361,7 @@
<section class="row dash-row">
<div class="col-lg-5 col-md-6 col-sm-12 content-info">
<div class="content-container dash-align-right">
<div class="content-icon"><img src="assets/dash/2x/multiplatform performance light [email protected]"/></div>
<div class="content-icon"><img src="assets/dash/2x/multiplatform performance light [email protected]" alt="Multiplatform performance"/></div>
<div class="content-feature">Fast on all platforms</div>
<div class="content-desc" id="galleryThree">
<ul class="selector">
Expand Down Expand Up @@ -405,7 +405,7 @@
</div>
</div>
<div class="col-lg-7 col-md-6 col-sm-12 content-image">
<img class="galleryThree dash-align-left" src="assets/dash/svg/3-1 - aot compile.svg"/>
<img class="galleryThree dash-align-left" src="assets/dash/svg/3-1 - aot compile.svg" alt="Compiling dart file"/>
</div>
</section>
<section class="row dash-dartpad-row">
Expand Down
10 changes: 5 additions & 5 deletions src/null-safety/understanding-null-safety.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ types.

In type theory lingo, the `Null` type was treated as a subtype of all types:

<img src="/assets/img/null-safety/understanding-null-safety/hierarchy-before.png" width="335">
<img src="/assets/img/null-safety/understanding-null-safety/hierarchy-before.png" alt="Null Safety Hierarchy Before" width="335">

The set of operations—getters, setters, methods, and
operators—allowed on some expressions are defined by its type. If the type
Expand All @@ -140,7 +140,7 @@ Null safety eliminates that problem at the root by changing the type hierarchy.
The `Null` type still exists, but it's no longer a subtype of all types.
Instead, the type hierarchy looks like this:

<img src="/assets/img/null-safety/understanding-null-safety/hierarchy-after.png" width="344">
<img src="/assets/img/null-safety/understanding-null-safety/hierarchy-after.png" alt="Null Safety Hierarchy After" width="344">

Since `Null` is no longer a subtype, no type except the special `Null` class
permits the value `null`. We've made all types *non-nullable by default*. If you
Expand Down Expand Up @@ -202,7 +202,7 @@ problems. We model this by making every nullable type a supertype of its
underlying type. You can also safely pass `null` to something expecting a nullable type, so
`Null` is also a subtype of every nullable type:

<img src="/assets/img/null-safety/understanding-null-safety/nullable-hierarchy.png" width="235">
<img src="/assets/img/null-safety/understanding-null-safety/nullable-hierarchy.png" alt="Nullable" width="235">

But going the other direction and passing a nullable type to something expecting
the underlying non-nullable type is unsafe. Code that expects a `String` may
Expand Down Expand Up @@ -281,7 +281,7 @@ returns. With the removal of implicit downcasts, this becomes a compile error.
Where were we? Right, OK, so it's as if we've taken the universe of types in
your program and split them into two halves:

<img src="/assets/img/null-safety/understanding-null-safety/bifurcate.png" width="668">
<img src="/assets/img/null-safety/understanding-null-safety/bifurcate.png" alt="Nullable and Non-Nullable types" width="668">

There is a region of non-nullable types. Those types let you access all of the
interesting methods, but can never ever contain `null`. And then there is a
Expand Down Expand Up @@ -322,7 +322,7 @@ subtype of it. Dart has no *named* top type. If you need a top type, you want
`Object?`. Likewise, `Null` is no longer the bottom type. If it was, everything
would still be nullable. Instead, we've added a new bottom type named `Never`:

<img src="/assets/img/null-safety/understanding-null-safety/top-and-bottom.png" width="360">
<img src="/assets/img/null-safety/understanding-null-safety/top-and-bottom.png" alt="Top and Bottom" width="360">

In practice, this means:

Expand Down

0 comments on commit a535f07

Please sign in to comment.