Skip to content

Make hover text render similar to in game#85

Merged
creesch merged 5 commits intomainfrom
improved-hover
Feb 23, 2025
Merged

Make hover text render similar to in game#85
creesch merged 5 commits intomainfrom
improved-hover

Conversation

@danthedaniel
Copy link
Copy Markdown
Member

@danthedaniel danthedaniel commented Feb 23, 2025

Screen.Recording.2025-02-22.at.4.59.53.PM.mov

I'm using aria-label as a bit of a hack for testing the result of formatHoverEvent() because now the elements it returns are held in closure state instead of within the DOM.

@danthedaniel danthedaniel requested a review from creesch February 23, 2025 00:50
@danthedaniel danthedaniel force-pushed the improved-hover branch 2 times, most recently from 604e0ea to f402e2d Compare February 23, 2025 00:56
Copy link
Copy Markdown
Collaborator

@creesch creesch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good, small request to change the colors.

I am a bit concerned about the way you use the aria label as it might cause issues if someone is using a screen reader. Although from quick testing with a screen reader the behavior seems to be still the same (but I am also not an expert).
It is just something I want to be mindful about since one of the reasons I finally started work on this mod is, in a way, accessibility. It is also why I previously explicitly added aria labels.

It isn't blocking, as I said it seems to work, just providing some context.

@danthedaniel
Copy link
Copy Markdown
Member Author

I think if anything I might want to permanently aria-hide the hover container as it's redundant to the label information.

But if you're using a screen reader would you hover over the text? It might not be a concern in practice.

@creesch
Copy link
Copy Markdown
Collaborator

creesch commented Feb 23, 2025

But if you're using a screen reader would you hover over the text? It might not be a concern in practice.

I honestly don't know how different screen readers work and how people use them. Like I said, from what I know now it seems like it isn't an issue. But it is something I want to remain mindful about.

@creesch creesch merged commit 4930c1a into main Feb 23, 2025
@danthedaniel danthedaniel deleted the improved-hover branch February 23, 2025 17:50
creesch added a commit that referenced this pull request Mar 12, 2025
This release contains a variety of new features and improvements.  Things like support for newer minecraft versions, tab complete of usernames, hover events and a bunch more! 

# Main

## New

- Translations are now retrieved per chat message from the game at run time and stored with the message. (#84) Meaning that mod messages will display, messages will show in the language you will have set and that the mod now officially supports **1.21.1 and up** as messages will always have the correct translation for that minecraft version. 
- Support added for the `/tell`, `/msg`, `/w` and `/me` commands. (#82)   Note: This mod is never going to support all commands as this easily can be used for abuse. 
- Click events are now supported (#86)
- Tab completion of usernames (#78)
- Use "Jetbrains Mono" font for chat message/input/player names making it look more like minecraft chat (#80)
- Support for legacy color/format codes and multi-space formatting (#69)

## Fixes/enhancements 
- Make pingPatterns case insensitive (#63) 
- Added aria labels and use semantic elements (#58)
- Hover text now renders similar to in game (#85) and supports color code (#87)

# Technical
- Restructured front-end code to not only be modules but classes (#59)
- Simplify player heads rendering (#70)
- A variety of dependencies has been updated. 

# Various other 
For a complete overview see the [commit history](https://github.com/creesch/minecraft-web-chat/commits/main/)

# Screenshots 
![image](https://github.com/user-attachments/assets/91d4e140-c1a5-4fe2-ab74-9bee12ca0a7a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants