Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Users should be able to opt into making alt text required for posts #907

Closed
Emma-Fuller opened this issue Jun 25, 2023 · 8 comments · Fixed by #914
Closed

Users should be able to opt into making alt text required for posts #907

Emma-Fuller opened this issue Jun 25, 2023 · 8 comments · Fixed by #914
Assignees
Labels
feature-request A request for a new feature

Comments

@Emma-Fuller
Copy link
Contributor

Is your feature request related to a problem? Please describe.

I like to add alt text to images when I post on social media, but sometimes it can be easy to forget to add it before posting.

One solution is to provide a way to retroactively add alt text as suggested in #659, however, it would be useful to have an accessibility toggle that a user can enable that turns not having alt text on an image into a validation error to make it easier to remember to add alt text

Describe the solution you'd like

The ideal solution in my opinion would involve two new components. Firstly, a user setting toggle to force Alt Text validation errors on empty. This could either be in a new accessibility settings menu or within the top level menu

Illustration of proposed options menu addition. A new accessibility section with option to require alt text

When the toggle is enabled, it would show a validation error alerting the user that they need to enter alt text as well as disable the send button until alt text is added

Illustration of proposed validation error. An error is displayed to the user, letting them know they need to add alt text to their image submission

Describe alternatives you've considered

There's a few alternative implementations that would be worth considering.

As mentioned above, another way to help alleviate the issue would be supporting #659 which would make the need to provide upfront validation a smaller concern

Alternatively, instead of providing the option as a user toggle, a more aggressive strategy would be to make alt text mandatory for all users. This may be a very aggressive stance, which is why the proposal is to add a user toggle

Additional context

I would be happy to discuss further or make any proposed changes as an external contribution. I already started a working implementation of the proposed feature but I figured creating an issue first would be the preferred course of action

@Emma-Fuller Emma-Fuller added the feature-request A request for a new feature label Jun 25, 2023
@pfrazee
Copy link
Collaborator

pfrazee commented Jun 26, 2023

This is an interesting idea, yeah. I'm going to rework how the alt text inputs work this week. I'll ping again afterwards about this, to see if you still feel this would be worth it.

@pfrazee pfrazee self-assigned this Jun 26, 2023
@Emma-Fuller
Copy link
Contributor Author

Sounds good, thanks for the quick response!

@pfrazee
Copy link
Collaborator

pfrazee commented Jun 26, 2023

Tried a couple of things but this ended up being the results. There's now some visual feedback if you've added alt text. LMK if you think the setting would still be useful!

Updates to the alt text composer

@Emma-Fuller
Copy link
Contributor Author

Checking it out now

@Emma-Fuller
Copy link
Contributor Author

Those changes are great, and definitely make the process of adding alt text a lot easier. I think that adding in the toggle is still a useful addition on top of these changes though. It'll help users who want to make sure their posts are accessible but just forget sometimes (me lol), and it's a pretty easy check to add to the composer component. I think something like

if (gallery.images.some(image => image.altText.trim() === "")) {
  setError('One or more images is missing alt text')
  return
}

is straightforward enough and doesnt add too much complexity. I'd be happy to fork off your MR and give it a first pass, but ultimately I'll defer to your judgment

@Emma-Fuller
Copy link
Contributor Author

Emma-Fuller commented Jun 27, 2023

Created a pull request with a basic implementation. Tested locally and it seems to work pretty well. I can add screenshots, documentation, etc if needed, but feel free to check it out to get an idea of what im going for

@pfrazee
Copy link
Collaborator

pfrazee commented Jun 28, 2023

Thanks for the contribution @Emma-Fuller. We're tuning the behavior a bit and then we'll merge #914

@Emma-Fuller
Copy link
Contributor Author

Emma-Fuller commented Jun 28, 2023

Could you go into a bit more detail on what you mean by tuning the behavior?

Also, after engaging with some discussion about the proposed change in bsky, I think it would be worth looking at making this feature enabled by default. thread

If it helps prevent friction with turning it on by default, it might be useful to either link the setting page or include a "post anyways" button to allow the user to override the validation on a per post basis

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A request for a new feature
Projects
None yet
2 participants