mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-20 02:10:15 +01:00
🙌 a11y: Searchbar/Conversations List Focus (#7096)
* chore: remove redundancy of useSetRecoilState and useRecoilValue with useRecoilState in SearchBar * refactor: remove unnecessary focus effect on text area in ChatForm * refactor: improve searchbar and clear search button accessibility * fix: add tabIndex to Conversations component for improved accessibility, moves focus directly conversation items * style: adjust margin in Header component for improved layout symmetry with Nav * chore: imports order
This commit is contained in:
parent
550c7cc68a
commit
6826c0ed43
4 changed files with 18 additions and 15 deletions
|
|
@ -151,12 +151,6 @@ const ChatForm = memo(({ index = 0 }: { index?: number }) => {
|
|||
|
||||
const textValue = useWatch({ control: methods.control, name: 'text' });
|
||||
|
||||
useEffect(() => {
|
||||
if (!search.isSearching && textAreaRef.current && !disableInputs) {
|
||||
textAreaRef.current.focus();
|
||||
}
|
||||
}, [search.isSearching, disableInputs]);
|
||||
|
||||
useEffect(() => {
|
||||
if (textAreaRef.current) {
|
||||
const style = window.getComputedStyle(textAreaRef.current);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue