Skip to content

Commit

Permalink
chore(docs): refactor README.md (#70503)
Browse files Browse the repository at this point in the history
# Summary
Remove redundant html element and css.
Add alt text to images.
Both old and new README.md have the same appearance. 

## Description
I changed some parts.

### 1. Insert `align="center"` into only top `<div>` tag
The all of logo, title, and badges are center.
Then it doesn't need to call at every element.

### 2. Move `<h1>` tag outside `<a>` tag
The title doesn't have link even if inside `<a>` tag when it's wrapped
heading element.
So put it out for the readability.

### 3. Use image alt text instead of aria-label
Alt text is displayed on the page if the images can't be loaded.
That's why I prefer alt text to aria-label.
In addition, the screen reader still reads the same words after
updating.

### Improving Documentation

- [x] Run `pnpm prettier-fix` to fix formatting issues before opening
the PR.
- [x] Read the Docs Contribution Guide to ensure your contribution
follows the docs guidelines:
https://nextjs.org/docs/community/contribution-guide

x-ref: [\<img>: The Image Embed
element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img)
| mdn web docs

---------

Co-authored-by: JJ Kasper <[email protected]>
  • Loading branch information
Marukome0743 and ijjk authored Oct 2, 2024
1 parent f08fcd4 commit 1d1b846
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions packages/next/README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
<p align="center">
<div align="center">
<a href="https://nextjs.org">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://assets.vercel.com/image/upload/v1662130559/nextjs/Icon_dark_background.png">
<img src="https://assets.vercel.com/image/upload/v1662130559/nextjs/Icon_light_background.png" height="128">
<img alt="Next.js logo" src="https://assets.vercel.com/image/upload/v1662130559/nextjs/Icon_light_background.png" height="128">
</picture>
<h1 align="center">Next.js</h1>
</a>
</p>

<p align="center">
<a aria-label="Vercel logo" href="https://vercel.com"><img src="https://img.shields.io/badge/MADE%20BY%20Vercel-000000.svg?style=for-the-badge&logo=Vercel&labelColor=000"></a>
<a aria-label="NPM version" href="https://www.npmjs.com/package/next"><img alt="" src="https://img.shields.io/npm/v/next.svg?style=for-the-badge&labelColor=000000"></a>
<a aria-label="License" href="https://github.com/vercel/next.js/blob/canary/license.md"><img alt="" src="https://img.shields.io/npm/l/next.svg?style=for-the-badge&labelColor=000000"></a>
<a aria-label="Join the community on GitHub" href="https://github.com/vercel/next.js/discussions"><img alt="" src="https://img.shields.io/badge/Join%20the%20community-blueviolet.svg?style=for-the-badge&logo=Next.js&labelColor=000000&logoWidth=20"></a>
</p>
<h1>Next.js</h1>

<a href="https://vercel.com"><img alt="Vercel logo" src="https://img.shields.io/badge/MADE%20BY%20Vercel-000000.svg?style=for-the-badge&logo=Vercel&labelColor=000"></a>
<a href="https://www.npmjs.com/package/next"><img alt="NPM version" src="https://img.shields.io/npm/v/next.svg?style=for-the-badge&labelColor=000000"></a>
<a href="https://github.com/vercel/next.js/blob/canary/license.md"><img alt="License" src="https://img.shields.io/npm/l/next.svg?style=for-the-badge&labelColor=000000"></a>
<a href="https://github.com/vercel/next.js/discussions"><img alt="Join the community on GitHub" src="https://img.shields.io/badge/Join%20the%20community-blueviolet.svg?style=for-the-badge&logo=Next.js&labelColor=000000&logoWidth=20"></a>

</div>

## Getting Started

Expand Down

0 comments on commit 1d1b846

Please sign in to comment.