Interface de acessibilidade do editor (tinyblocks-a11y)
Library nova, no papel do ATK/GtkAccessible: cada quadro o editor monta uma árvore acessível (papel, nome, descrição, valor, estados, ações, retângulo), com ids estáveis, eventos entre quadros (foco, estado, nome, valor, componente novo, aviso) e uma ponte para o narrador (TINYBLOCKS_A11Y=log liga uma ponte de texto no stderr). Cada parte da tela se descreve onde é desenhada: menu, áreas, categorias, paleta, abas, blocos (rótulo falado, campos, bocas, parâmetros do defina), grupos, palco, saída, menus e diálogos. As ações agem pelo mesmo caminho do mouse e rolam até o componente se ele estiver fora da vista. API: tb_editor_accessible(scene). O harness acha componentes pela árvore (categorias, cenários 8 e 27) e tem um cenário só de acessibilidade; test-a11y testa a library. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
80bd330766
commit
600c4fc520
12 files changed
+1557
-103
No files matched your search
@@ -45,6 +45,7 @@ GX_DIR := $(LIBDIR)/tinyblocks-graphics
|
||||
SD_DIR := $(LIBDIR)/tinyblocks-sdl2
|
||||
PY_DIR := $(LIBDIR)/tinyblocks-python
|
||||
MC_DIR := $(LIBDIR)/tinyblocks-mcp
|
||||
A11Y_DIR := $(LIBDIR)/tinyblocks-a11y
|
||||
|
||||
GFX_INC := $(GX_DIR)/include
|
||||
GFX_HDR := $(GFX_INC)/tb_graphics.h
|
||||
@@ -94,13 +95,14 @@ API_A := $(API_DIR)/build/libtinyblocks-api.a
|
||||
LIBM_A := $(LIBM_DIR)/build/libtinyblocks-libman.a
|
||||
SYN_A := $(SYN_DIR)/build/libtinyblocks-syntax.a
|
||||
SB_A := $(SB_DIR)/build/libtinyblocks-scratchblocks.a
|
||||
A11Y_A := $(A11Y_DIR)/build/libtinyblocks-a11y.a
|
||||
LIB_LDFLAGS := -L$(ED_DIR)/build -L$(GX_DIR)/build -L$(SD_DIR)/build \
|
||||
$(foreach l,$(CAT_LIBS),-L$(LIBDIR)/tinyblocks-$(l)/build) -L$(BUILD)
|
||||
|
||||
.PHONY: all help debug release static shared example sdl2 clean run python-lib mcp-lib json \
|
||||
editor run-editor run-sdl2 mylib vector customappearance graphics sdl2-backend test-editor \
|
||||
appdir appimage run-appimage icon \
|
||||
test-toml test-plugin test-blueprint test-base64 test-curves test-meta test-ppm test-bmp test-png test-image test-vg test-svg test-jpg \
|
||||
test-toml test-plugin test-blueprint test-a11y test-base64 test-curves test-meta test-ppm test-bmp test-png test-image test-vg test-svg test-jpg \
|
||||
test-syntax test-os test-value test-vars test-scratchblocks test-input test-stdlib test-regex test-markdown test-opentype \
|
||||
category-libs category-sos libs \
|
||||
lib-events lib-control lib-errors lib-input lib-operators lib-number lib-string lib-variables lib-vector lib-appearance lib-pen lib-fs lib-os \
|
||||
@@ -164,9 +166,12 @@ lib-$(1):
|
||||
endef
|
||||
$(foreach l,$(CAT_LIBS),$(eval $(call CAT_LIB_TARGET,$(l))))
|
||||
|
||||
lib-editor:
|
||||
lib-editor: lib-a11y
|
||||
$(MAKE) -C $(ED_DIR)
|
||||
|
||||
lib-a11y:
|
||||
$(MAKE) -C $(A11Y_DIR)
|
||||
|
||||
lib-toml:
|
||||
$(MAKE) -C $(TOML_DIR)
|
||||
|
||||
@@ -244,8 +249,8 @@ lib-mcp:
|
||||
|
||||
libs: static lib-events lib-control lib-errors lib-operators lib-variables \
|
||||
lib-appearance lib-pen lib-fs lib-os lib-input lib-number lib-string lib-vector lib-environ lib-graphics lib-sdl2 lib-toml \
|
||||
lib-json lib-xml lib-csv lib-blueprint lib-base64 lib-curves lib-ppm lib-bmp lib-png lib-image lib-vg lib-svg lib-jpg lib-syntax lib-scratchblocks lib-regex lib-markdown lib-opentype lib-api lib-libman lib-editor
|
||||
@echo "Libraries OK: category + graphics + sdl2 + toml + json + xml + csv + blueprint + base64 + curves + ppm + bmp + png + image + vg + svg + jpg + syntax + regex + markdown + opentype + api + libman + editor"
|
||||
lib-json lib-xml lib-csv lib-blueprint lib-base64 lib-curves lib-ppm lib-bmp lib-png lib-image lib-vg lib-svg lib-jpg lib-syntax lib-scratchblocks lib-regex lib-markdown lib-opentype lib-api lib-libman lib-a11y lib-editor
|
||||
@echo "Libraries OK: category + graphics + sdl2 + toml + json + xml + csv + blueprint + base64 + curves + ppm + bmp + png + image + vg + svg + jpg + syntax + regex + markdown + opentype + api + libman + a11y + editor"
|
||||
|
||||
category-libs: static $(foreach l,$(CAT_LIBS),lib-$(l)) ## Compila as libraries de categoria (.a/.so)
|
||||
@echo "Build category libs OK"
|
||||
@@ -287,9 +292,9 @@ $(BUILD)/editor: examples/editor/main.c static libs
|
||||
-I$(ED_DIR)/include -I$(GFX_INC) $(CAT_INCS) \
|
||||
-I$(FS_DIR)/include -I$(EN_DIR)/include -I$(TOML_DIR)/include \
|
||||
-I$(JSON_DIR)/include -I$(XML_DIR)/include -I$(CSV_DIR)/include -I$(BP_DIR)/include \
|
||||
-I$(API_DIR)/include -I$(LIBM_DIR)/include -I$(SYN_DIR)/include \
|
||||
-I$(API_DIR)/include -I$(LIBM_DIR)/include -I$(SYN_DIR)/include -I$(A11Y_DIR)/include \
|
||||
$< -o $@ \
|
||||
-Wl,--start-group $(ED_A) $(GX_A) $(SD_A) $(TOML_A) $(JSON_A) $(XML_A) $(CSV_A) $(BP_A) $(SB_A) $(API_A) $(LIBM_A) $(SYN_A) $(CAT_A) $(LIB_A) -Wl,--end-group \
|
||||
-Wl,--start-group $(ED_A) $(A11Y_A) $(GX_A) $(SD_A) $(TOML_A) $(JSON_A) $(XML_A) $(CSV_A) $(BP_A) $(SB_A) $(API_A) $(LIBM_A) $(SYN_A) $(CAT_A) $(LIB_A) -Wl,--end-group \
|
||||
$(SDL2_LIBS) $(SDL2TTF_LIBS) -ldl -lm -rdynamic \
|
||||
'-Wl,-rpath,$$ORIGIN'
|
||||
|
||||
@@ -447,15 +452,16 @@ $(BUILD)/editor_harness: tests/editor_harness.c $(SRCS) \
|
||||
$(EW_DIR)/include/tb_editor_widgets.h \
|
||||
$(EIMG_DIR)/include/tb_editor_image.h \
|
||||
$(EFILES_DIR)/include/tb_editor_files.h \
|
||||
$(GX_DIR)/src/tb_graphics.c lib-blueprint ed-modules
|
||||
$(GX_DIR)/src/tb_graphics.c $(A11Y_DIR)/src/tb_a11y.c $(A11Y_DIR)/include/tb_a11y.h \
|
||||
lib-blueprint ed-modules
|
||||
@mkdir -p $(BUILD)
|
||||
$(CC) $(CFLAGS_DBG) \
|
||||
-I$(ED_DIR)/include -DTB_EDITOR_PRIVATE_API -I$(EW_DIR)/include -I$(EIMG_DIR)/include -I$(EFILES_DIR)/include -I$(GFX_INC) $(CAT_INCS) -I$(BP_DIR)/include \
|
||||
-I$(ED_DIR)/include -I$(A11Y_DIR)/include -DTB_EDITOR_PRIVATE_API -I$(EW_DIR)/include -I$(EIMG_DIR)/include -I$(EFILES_DIR)/include -I$(GFX_INC) $(CAT_INCS) -I$(BP_DIR)/include \
|
||||
-I$(API_DIR)/include -I$(LIBM_DIR)/include -I$(EN_DIR)/include -I$(TOML_DIR)/include -I$(CV_DIR)/include -I$(B64_DIR)/include -I$(PPM_DIR)/include -I$(SYN_DIR)/include -I$(SB_DIR)/include \
|
||||
$(SRCS) \
|
||||
$(EDITOR_SRC)/tb_editor.c $(EDITOR_SRC)/tb_stage_widget.c \
|
||||
$(EDITOR_SRC)/tb_editor_modules.c \
|
||||
$(GX_DIR)/src/tb_graphics.c \
|
||||
$(GX_DIR)/src/tb_graphics.c $(A11Y_DIR)/src/tb_a11y.c \
|
||||
$(BP_DIR)/src/blueprint.c $(BP_DIR)/src/serialize.c \
|
||||
$(API_DIR)/src/tb_api.c $(LIBM_DIR)/src/tb_libman.c \
|
||||
$(TOML_LIB_SRCS) $(TOML_DIR)/src/tb_toml.c \
|
||||
@@ -513,6 +519,14 @@ $(BUILD)/environ_test: tests/environ_test.c $(EN_DIR)/src/tb_environ.c static
|
||||
test-environ: $(BUILD)/environ_test ## Roda o teste da environ (ASan/UBSan)
|
||||
./$(BUILD)/environ_test
|
||||
|
||||
# -- Teste da library a11y (arvore acessivel) ---
|
||||
$(BUILD)/a11y_test: tests/a11y_test.c $(A11Y_DIR)/src/tb_a11y.c $(A11Y_DIR)/include/tb_a11y.h static
|
||||
@mkdir -p $(BUILD)
|
||||
$(CC) $(CFLAGS_DBG) -I$(A11Y_DIR)/include $(A11Y_DIR)/src/tb_a11y.c tests/a11y_test.c -o $@
|
||||
|
||||
test-a11y: $(BUILD)/a11y_test ## Roda o teste da interface de acessibilidade (ASan/UBSan)
|
||||
./$(BUILD)/a11y_test
|
||||
|
||||
# -- Teste da library base64 ---
|
||||
$(BUILD)/base64_test: tests/base64_test.c $(B64_DIR)/src/tb_base64.c static
|
||||
@mkdir -p $(BUILD)
|
||||
|
||||
Reference in new issue
Block a user