feat: accessibility
This commit is contained in:
@@ -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">
|
||||
|
||||
@@ -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 ? (
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -127,6 +127,7 @@ export const SiteHeader: React.FC<{
|
||||
onClick={(e) => {
|
||||
e.stopPropagation()
|
||||
}}
|
||||
aria-label="more"
|
||||
>
|
||||
<EllipsisHorizontalIcon className="w-5 h-5" />
|
||||
</Button>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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>
|
||||
)
|
||||
|
||||
@@ -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 />
|
||||
|
||||
Reference in New Issue
Block a user