krahets / hello-algo

《Hello 算法》:动画图解、一键运行的数据结构与算法教程。支持 Python, Java, C++, C, C#, JS, Go, Swift, Rust, Ruby, Kotlin, TS, Dart 代码。简体版和繁体版同步更新,English version ongoing
https://www.hello-algo.com
Other
95.04k stars 12.07k forks source link

Improved HTML Structure for Better Accessibility and Maintainability #1434

Open eagleanurag opened 2 months ago

eagleanurag commented 2 months ago

Commit Description:

Semantic Sectioning and Class Names:
    Updated class names to be more descriptive.
    Ensured better readability and maintainability.

Alt Text for Images:
    Added alt attributes to all <img> tags to improve accessibility.

SVG Elements:
    Added appropriate role attributes to SVG elements.

External Links:
    Updated external links to open in a new tab using target="_blank".
    Added rel="noopener noreferrer" for security reasons.

CSS Separation:
    Inlined styles for demonstration purposes but recommended moving them to a separate stylesheet for better separation of concerns.

If this pull request (PR) pertains to Chinese-to-English translation, please confirm that you have read the contribution guidelines and complete the checklist below:

If this pull request (PR) is associated with coding or code transpilation, please attach the relevant console outputs to the PR and complete the following checklist:

CodeDance2023 commented 1 month ago

good

krahets commented 1 month ago

Thanks for the PR! Could you help update docs/index.html and zh-hant/index.html also?