glitch-soc / mastodon

A glitchy but lovable microblogging server
https://glitch-soc.github.io/docs/
GNU Affero General Public License v3.0
690 stars 184 forks source link

Adjustable (increased) character limit for alt text #2689

Open SleepyCatten opened 6 months ago

SleepyCatten commented 6 months ago

Pitch

Glitch has an adjustable character limit for posts, but the limit for alt text seems to be baked in at 1,500 characters. Whilst this might sound like a lot, it actually often isn't enough to provide a full transcription for audio or for the text on images, which is an accessibility issue. I've had to break up images or audio clips into several ones sometimes in order to be able to provide full descriptive text. It is only 50% higher than the very restrictive alt text limit on Twitter and seems to be rather arbitrary, rather than something required.

Motivation

It will help with accessibility, as it will make it possible to describe images with text in full. It will also further set glitch-soc from Mastodon, which has refused to address the character or alt text limits here: https://github.com/mastodon/mastodon/issues/24147

Ember-ruby commented 4 months ago

as an addition, only two values need to be changed

https://github.com/glitch-soc/mastodon/blob/2a34c9a01e921b7e5771e11a83c6187ca3db5f31/app/javascript/flavours/glitch/features/ui/components/focal_point_modal.jsx#L378

https://github.com/glitch-soc/mastodon/blob/2a34c9a01e921b7e5771e11a83c6187ca3db5f31/app/models/media_attachment.rb#L40

an environment variable could probably be implemented like for toot chars

https://github.com/glitch-soc/mastodon/blob/60c2310fd879885755c620b060828e3d6a560e0b/app/javascript/flavours/glitch/features/compose/containers/compose_form_container.js#L76

https://github.com/glitch-soc/mastodon/blob/2a34c9a01e921b7e5771e11a83c6187ca3db5f31/app/javascript/flavours/glitch/features/compose/components/compose_form.jsx#L329