Skip to content

Commit 38aa9b1

Browse files
committed
fix: resolve accessibility issues across Navbar, TopicsGrid, Footer
- Navbar.jsx: replace href='#' Home menu item with href='/' - Navbar.jsx: replace placeholder mobile menu items (Dashboard/Team/ Projects/Calendar with href='#') with real app routes: Home, Developer's Library, Coding Conventions, Accessibility - TopicsGrid.js: replace <a href='#'> Learn More/Bookmark anchors with <button> elements (links without valid href violate jsx-a11y/anchor-is-valid) - Footer.jsx: remove redundant role='list' from all 4 <ul> elements (ul has implicit list role per HTML spec; explicit role is redundant)
1 parent 9c47fa9 commit 38aa9b1

9 files changed

Lines changed: 23 additions & 23 deletions

File tree

build/asset-manifest.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
{
22
"files": {
33
"main.css": "/static/css/main.de52830b.css",
4-
"main.js": "/static/js/main.969ba515.js",
4+
"main.js": "/static/js/main.42bfeec3.js",
55
"static/media/slick.svg": "/static/media/slick.2630a3e3eab21c607e21.svg",
66
"static/media/slick.eot": "/static/media/slick.a4e97f5a2a64f0ab1323.eot",
77
"static/media/slick.ttf": "/static/media/slick.c94f7671dcc99dce43e2.ttf",
88
"static/media/slick.woff": "/static/media/slick.295183786cd8a1389865.woff",
99
"index.html": "/index.html",
1010
"main.de52830b.css.map": "/static/css/main.de52830b.css.map",
11-
"main.969ba515.js.map": "/static/js/main.969ba515.js.map"
11+
"main.42bfeec3.js.map": "/static/js/main.42bfeec3.js.map"
1212
},
1313
"entrypoints": [
1414
"static/css/main.de52830b.css",
15-
"static/js/main.969ba515.js"
15+
"static/js/main.42bfeec3.js"
1616
]
1717
}

build/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="./CforD2.png"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><title>Content For Developers</title><script defer="defer" src="/static/js/main.969ba515.js"></script><link href="/static/css/main.de52830b.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script src="./darkMode.js"></script></body></html>
1+
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="./CforD2.png"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><title>Content For Developers</title><script defer="defer" src="/static/js/main.42bfeec3.js"></script><link href="/static/css/main.de52830b.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script src="./darkMode.js"></script></body></html>

build/static/js/main.42bfeec3.js

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
File renamed without changes.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/static/js/main.969ba515.js

Lines changed: 0 additions & 3 deletions
This file was deleted.

src/components/TopicsGrid/TopicsGrid.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ export default function TopicsGrid() {
3131
<li className="text-gray-600">{topic.point3}</li>
3232
</ul>
3333
<div className="mt-4 flex justify-end">
34-
<a href="#" className="px-4 py-2 bg-blue-500 text-white rounded-lg mr-2">Learn More</a>
35-
<a href="#" className="px-4 py-2 bg-gray-300 text-gray-600 rounded-lg">Bookmark</a>
34+
<button className="px-4 py-2 bg-blue-500 text-white rounded-lg mr-2">Learn More</button>
35+
<button className="px-4 py-2 bg-gray-300 text-gray-600 rounded-lg">Bookmark</button>
3636
</div>
3737
</div>
3838
</div>

src/components/footer/Footer.jsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ export default function Example() {
110110
<div className="md:grid md:grid-cols-2 md:gap-8">
111111
<div>
112112
<h3 className="text-sm font-semibold leading-6 text-gray-900">Content</h3>
113-
<ul role="list" className="mt-6 space-y-4">
113+
<ul className="mt-6 space-y-4">
114114
{navigation.content.map((item) => (
115115
<li key={item.name}>
116116
<a href={item.href} className="text-sm leading-6 text-gray-600 hover:text-gray-900">
@@ -122,7 +122,7 @@ export default function Example() {
122122
</div>
123123
<div className="mt-10 md:mt-0">
124124
<h3 className="text-sm font-semibold leading-6 text-gray-900">Contribute</h3>
125-
<ul role="list" className="mt-6 space-y-4">
125+
<ul className="mt-6 space-y-4">
126126
{navigation.support.map((item) => (
127127
<li key={item.name}>
128128
<a href={item.href} className="text-sm leading-6 text-gray-600 hover:text-gray-900">
@@ -136,7 +136,7 @@ export default function Example() {
136136
<div className="md:grid md:grid-cols-2 md:gap-8">
137137
<div>
138138
<h3 className="text-sm font-semibold leading-6 text-gray-900">Company</h3>
139-
<ul role="list" className="mt-6 space-y-4">
139+
<ul className="mt-6 space-y-4">
140140
{navigation.company.map((item) => (
141141
<li key={item.name}>
142142
<a href={item.href} className="text-sm leading-6 text-gray-600 hover:text-gray-900">
@@ -148,7 +148,7 @@ export default function Example() {
148148
</div>
149149
<div className="mt-10 md:mt-0">
150150
<h3 className="text-sm font-semibold leading-6 text-gray-900">Open Source</h3>
151-
<ul role="list" className="mt-6 space-y-4">
151+
<ul className="mt-6 space-y-4">
152152
{navigation.legal.map((item) => (
153153
<li key={item.name}>
154154
<a href={item.href} className="text-sm leading-6 text-gray-600 hover:text-gray-900">

src/components/navbar/Navbar.jsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ export default function NavBar() {
120120
<Menu.Item>
121121
{({ active }) => (
122122
<a
123-
href="#"
123+
href="/"
124124
className={classNames(
125125
active ? "bg-gray-100" : "",
126126
"block px-4 py-2 text-sm hover:text-accent"
@@ -245,31 +245,31 @@ export default function NavBar() {
245245
{/* Current: "bg-gray-900 text-white", Default: "text-gray-300 hover:bg-gray-700 hover:text-white" */}
246246
<Disclosure.Button
247247
as="a"
248-
href="#"
248+
href="/"
249249
className="block rounded-md bg-gray-900 px-3 py-2 text-base font-medium text-white"
250250
>
251-
Dashboard
251+
Home
252252
</Disclosure.Button>
253253
<Disclosure.Button
254254
as="a"
255-
href="#"
255+
href="/DevelopersLibrary"
256256
className="block rounded-md px-3 py-2 text-base font-medium text-gray-300 hover:bg-gray-700 hover:text-white"
257257
>
258-
Team
258+
Developer's Library
259259
</Disclosure.Button>
260260
<Disclosure.Button
261261
as="a"
262-
href="#"
262+
href="/codingconventions"
263263
className="block rounded-md px-3 py-2 text-base font-medium text-gray-300 hover:bg-gray-700 hover:text-white"
264264
>
265-
Projects
265+
Coding Conventions
266266
</Disclosure.Button>
267267
<Disclosure.Button
268268
as="a"
269-
href="#"
269+
href="/accessibilityandwcagguidelines"
270270
className="block rounded-md px-3 py-2 text-base font-medium text-gray-300 hover:bg-gray-700 hover:text-white"
271271
>
272-
Calendar
272+
Accessibility
273273
</Disclosure.Button>
274274
</div>
275275
<div className="border-t border-gray-700 pt-4 pb-3">

0 commit comments

Comments
 (0)