JavaScript for WordPress Forums Gutenberg Development Possible to the alt tag for the image in the Media Library using Gutenberg?

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #60920
    Belinda Mustoe
    Participant

    Is it possible to the alt tag for the image in the Media Library using Gutenberg? The Media Upload Button video shows how to grab the existing alt tag from the image that has been chosen. I want to be able to have a text box on the sidebar that will update the alt tag on the front end and also have it update the backend too, is it possible to do this?

    <PanelRow>
    <TextControl
        label={ __( 'Image Alt Tag', namespace ) }
        help={ __( 'Add an alt tag for accessibility', namespace ) }
        value={imgAlt}
        onChange={ imgAlt => setAttributes( { imgAlt } ) }
    />
    </PanelRow>

    I’m not sure how to begin approaching this!

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.