Skip to content

Commit 75de2e9

Browse files
committedMar 17, 2025
Updated Readme to describe the Plugins functionality
1 parent 697ed23 commit 75de2e9

File tree

1 file changed

+66
-6
lines changed

1 file changed

+66
-6
lines changed
 

‎README.md

+66-6
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,73 @@
1-
# Visua11y Infographic
1+
# Visua11y Infographic Plugin
22

3-
## Description
4-
Visua11y Infographic is a WordPress block plugin that allows users to create accessible infographics by simply uploading an image.
3+
**Version**: 0.1.0
4+
**Category**: Media
5+
**License**: GPL-2.0-or-later
6+
**Text Domain**: `visua11y-infographic`
7+
8+
## Overview
9+
10+
The **Visua11y Infographic** plugin is a WordPress block that empowers users to create accessible infographics by uploading or selecting an image file. Leveraging AI via a custom API, the plugin generates a comprehensive, accessible alternative for the infographic, which includes a detailed summary, a data table, and contextual information.
11+
12+
This plugin is designed to make infographics accessible to visually impaired users by providing a textual representation that describes the content of the image in a format that is easy to understand.
13+
14+
## Features
15+
16+
- **Upload and Analyze Infographics**: The user uploads or selects an infographic image. The plugin then uses a custom API, powered by AI, to analyze the content of the image.
17+
- **Generate Accessible Alternative**: The API generates a detailed accessible alternative for the infographic. The result includes:
18+
- **Summary**: A textual description summarizing the image.
19+
- **Data Table**: A table containing all the values from the infographic.
20+
- **Context Description**: A contextual description of the image.
21+
- **Edit and Customize**: The user can edit the generated content, deciding which elements (summary, data, context) to include or exclude.
22+
- **Format Selection**: The plugin offers three formats for presenting the alternative:
23+
1. **Default**: As a group below the content.
24+
2. **Details Block**: As a collapsible details block below the content.
25+
3. **Columns**: As columns next to each other for side-by-side display.
26+
- **Core Block Integration**: When inserting the accessible alternative as core blocks, the plugin:
27+
- Inserts the original image with an `aria-describedby` attribute.
28+
- Links the `aria-describedby` attribute to an anchor in the generated accessible alternative.
29+
- This setup allows visually impaired users to better understand the image by reading the detailed alternative content.
30+
31+
- **Extension of Core Image Block**: The plugin extends the core WordPress image block by adding an `aria-describedby` attribute to the image, linking it to the generated accessible alternative.
532

633
## Installation
734

8-
1. Upload the `visua11y-infographic` folder to the `/wp-content/plugins/` directory.
9-
2. Activate the plugin through the 'Plugins' menu in WordPress.
10-
3. Use the new block in the WordPress editor.
35+
1. **Upload Plugin Files**: Upload the `visua11y-infographic` folder to the `/wp-content/plugins/` directory on your WordPress site.
36+
2. **Activate the Plugin**: Activate the plugin via the 'Plugins' menu in the WordPress admin dashboard.
37+
3. **Use the Block**: After activation, you can access the "Visua11y Infographic" block in the WordPress editor to create accessible infographics.
38+
39+
## Usage
40+
41+
1. **Add the Block**: In the WordPress editor, click the "+" icon to add the "Visua11y Infographic" block.
42+
2. **Upload an Image**: Select or upload an infographic image.
43+
3. **Analysis and Generation**: The plugin will analyze the infographic using AI and generate a summary, data table, and context description.
44+
4. **Edit the Output**: The user can edit the generated content:
45+
- Choose which elements to include: summary, data, context.
46+
- Select a format for the content presentation (Default, Details Block, or Columns).
47+
5. **Insert as Core Blocks**:
48+
- Insert the infographic content as core blocks.
49+
- The original image is inserted with an `aria-describedby` attribute pointing to the generated accessible alternative.
50+
- This alternative is rendered as a separate block with a unique anchor ID, linking it to the image.
51+
6. **Enhance Accessibility**: The added `aria-describedby` attribute improves accessibility by ensuring that screen readers can link the image to its detailed accessible description, giving visually impaired users the context they need.
52+
53+
## Block Structure
54+
55+
The plugin uses the WordPress block editor to manage content for the infographic. The block is registered with the following metadata:
56+
57+
- **Block Name**: `visua11y/visua11y-infographic`
58+
- **Version**: 0.1.0
59+
- **Category**: Media
60+
- **Icon**: `chart-pie`
61+
- **Description**: A block that lets you create accessible infographics from simply uploading an image.
62+
63+
## Developer Notes
64+
65+
The plugin leverages several WordPress components and React libraries:
66+
67+
- **Block Registration**: The block is registered using `registerBlockType` from `@wordpress/blocks`.
68+
- **Editor Scripts and Styles**: The editor's functionality is powered by the `index.js`, `edit.js`, and `save.js` files. The block's appearance is styled using the `editor.scss` and `style.scss` files.
69+
- **Image Upload**: The `MediaUpload` component allows users to upload an image, which is then processed by the AI API.
70+
- **Accessible Alternative Generation**: The API generates an accessible alternative (summary, data table, context), which can be edited and inserted as core blocks.
1171

1272
## Development Setup
1373

0 commit comments

Comments
 (0)