@Jahan-Shah
Posted
Hi Madhav 👋. Well done on completing this challenge. To improve your code I've got some feedback
HTML:
-
Use Semantic elements like
<section>
,article>
instead of using<div>
. Use the<main>
tag to wrap all the main content in your HTML file to improve the accessibility of your page. -
You must include one heading 1 (h1). Even though there is no use of the h1 you should create an <h1> element in your HTML file that is inclusively hidden but readable to screen readers. You can copy this style to do that. e.g:
<h1 class="sr-only">Age Calculator App</h1>
. -
Use
<label>
tag above<input>
instead if using<div>
for more accessablity. e.g:<label for="day">Day</label> <input placeholder="DD" type="number" id="day" />
.
CSS:
- Use relative units like
rem
orem
instead of using pixels in the font size. The absolute units like pixel do not scale according to the user's browser settings, which can cause inaccessibility for users who uses large font size on their browser. You can read more about that here.
I hope you find this feedback useful 😄.
Marked as helpful
@Madhav3198
Posted
Hi @Jahan-Shah 👋,
Thank you so much for taking the time to review my work and provide valuable feedback. I truly appreciate your effort and suggestions for improving the code.
I am grateful for the specific recommendations you mentioned regarding the HTML and CSS aspects of my project. Your advice to use semantic elements like <section>, <article>, and the <main> tag makes perfect sense, and I will definitely incorporate them in my future projects to enhance accessibility.
I also appreciate the suggestion to include an <h1> element with the class "sr-only" for screen readers. This will ensure that the content is inclusive and accessible to all users.
Regarding CSS, I understand the importance of using relative units like rem or em instead of pixels for font sizes. I will make sure to adopt this practice moving forward to ensure better scalability and accessibility for users who adjust their browser settings.
Once again, thank you for your valuable feedback and guidance. I will take these points into consideration and apply them in my future challenges. Your input is truly useful and appreciated!