feat: accessibility

This commit is contained in:
DIYgod
2022-11-21 22:07:10 +00:00
parent d37be4409f
commit b690b43fef
8 changed files with 12 additions and 3 deletions
+4 -1
View File
@@ -16,7 +16,10 @@ export const BlockchainInfo: React.FC<{
<Disclosure defaultOpen={true}>
{({ open }: { open: boolean }) => (
<>
<Disclosure.Button className="flex w-full justify-between rounded-lg px-4 py-2 text-left text-gray-900 hover:bg-zinc-100 transition-colors md:rounded-xl">
<Disclosure.Button
className="flex w-full justify-between rounded-lg px-4 py-2 text-left text-gray-900 hover:bg-zinc-100 transition-colors md:rounded-xl"
aria-label="toggle chain info"
>
<span>
<BlockchainIcon className="w-4 h-4 inline-block align-middle mr-2" />
<span className="align-middle">
+2
View File
@@ -119,6 +119,7 @@ export const ConnectButton: React.FC<{
<button
className="flex items-center w-full"
type="button"
aria-label="connector"
>
<Avatar
className="align-middle mr-2"
@@ -173,6 +174,7 @@ export const ConnectButton: React.FC<{
href={link.url}
onClick={link.onClick}
className="px-4 h-8 flex items-center w-full whitespace-nowrap hover:bg-zinc-100"
aria-label={link.label}
>
<span className="mr-2">{link.icon}</span>
{link.label}
@@ -124,6 +124,7 @@ export const FollowingButton: React.FC<{
subscription.isLoading
}
size={size}
aria-label="follow"
>
<span className="i-bxs:bell"></span>
{subscription.data ? (
+1
View File
@@ -121,6 +121,7 @@ export const SiteArchives: React.FC<{
variant="text"
onClick={fetchNextPage}
isLoading={isFetchingNextPage}
aria-label="load more"
>
There are {postPages[0].total - currentLength} more post
{postPages[0].total - currentLength > 1 ? "s" : ""}, click to
+1
View File
@@ -127,6 +127,7 @@ export const SiteHeader: React.FC<{
onClick={(e) => {
e.stopPropagation()
}}
aria-label="more"
>
<EllipsisHorizontalIcon className="w-5 h-5" />
</Button>
+1
View File
@@ -101,6 +101,7 @@ export const SiteHome: React.FC<{
variant="text"
onClick={fetchNextPage}
isLoading={isFetchingNextPage}
aria-label="load more"
>
There are {postPages[0].total - currentLength} more post
{postPages[0].total - currentLength > 1 ? "s" : ""}, click to load
+1 -1
View File
@@ -8,7 +8,7 @@ export const UniLink: React.FC<{
}> = ({ href, onClick, children, className, ...props }) => {
if (onClick) {
return (
<button className={className} onClick={onClick}>
<button className={className} onClick={onClick} {...props}>
{children}
</button>
)
+1 -1
View File
@@ -2,7 +2,7 @@ import { Html, Head, Main, NextScript, DocumentProps } from "next/document"
export default function Document(props: DocumentProps) {
return (
<Html>
<Html lang="en">
<Head></Head>
<body>
<Main />