mirror of
				https://github.com/ggml-org/llama.cpp.git
				synced 2025-10-31 08:51:55 +00:00 
			
		
		
		
	webui : improve accessibility for visually impaired people (#13551)
* webui : improve accessibility for visually impaired people * add a11y for extra contents * fix some labels being read twice * add skip to main content
This commit is contained in:
		| @@ -279,7 +279,11 @@ export default function ChatScreen() { | ||||
| function ServerInfo() { | ||||
|   const { serverProps } = useAppContext(); | ||||
|   return ( | ||||
|     <div className="card card-sm shadow-sm border-1 border-base-content/20 text-base-content/70 mb-6"> | ||||
|     <div | ||||
|       className="card card-sm shadow-sm border-1 border-base-content/20 text-base-content/70 mb-6" | ||||
|       tabIndex={0} | ||||
|       aria-description="Server information" | ||||
|     > | ||||
|       <div className="card-body"> | ||||
|         <b>Server Info</b> | ||||
|         <p> | ||||
| @@ -311,6 +315,8 @@ function ChatInput({ | ||||
|  | ||||
|   return ( | ||||
|     <div | ||||
|       role="group" | ||||
|       aria-label="Chat input" | ||||
|       className={classNames({ | ||||
|         'flex items-end pt-8 pb-6 sticky bottom-0 bg-base-100': true, | ||||
|         'opacity-50': isDrag, // simply visual feedback to inform user that the file will be accepted | ||||
| @@ -400,13 +406,15 @@ function ChatInput({ | ||||
|                     'btn w-8 h-8 p-0 rounded-full': true, | ||||
|                     'btn-disabled': isGenerating, | ||||
|                   })} | ||||
|                   aria-label="Upload file" | ||||
|                   tabIndex={0} | ||||
|                   role="button" | ||||
|                 > | ||||
|                   <PaperClipIcon className="h-5 w-5" /> | ||||
|                 </label> | ||||
|                 <input | ||||
|                   id="file-upload" | ||||
|                   type="file" | ||||
|                   className="hidden" | ||||
|                   disabled={isGenerating} | ||||
|                   {...getInputProps()} | ||||
|                   hidden | ||||
| @@ -422,6 +430,7 @@ function ChatInput({ | ||||
|                   <button | ||||
|                     className="btn btn-primary w-8 h-8 p-0 rounded-full" | ||||
|                     onClick={onSend} | ||||
|                     aria-label="Send message" | ||||
|                   > | ||||
|                     <ArrowUpIcon className="h-5 w-5" /> | ||||
|                   </button> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Xuan-Son Nguyen
					Xuan-Son Nguyen