From fa775ed30ad8969dacca34ddb63b76a89d8ba7da Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Tue, 20 Feb 2018 13:55:53 +0100 Subject: tdf#86661 a11y: give ROLE_LABEL to read-only edit ROLE_TEXT is for editable text, ROLE_LABEL should be used for static text, so that screen readers know they should speak it. Change-Id: I8f781a42a2838f641ccdfe7310046d74f9faced6 Reviewed-on: https://gerrit.libreoffice.org/50052 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt --- accessibility/source/standard/vclxaccessibleedit.cxx | 2 ++ 1 file changed, 2 insertions(+) (limited to 'accessibility') diff --git a/accessibility/source/standard/vclxaccessibleedit.cxx b/accessibility/source/standard/vclxaccessibleedit.cxx index 65f1c2817bce..17146ae2518c 100644 --- a/accessibility/source/standard/vclxaccessibleedit.cxx +++ b/accessibility/source/standard/vclxaccessibleedit.cxx @@ -218,6 +218,8 @@ sal_Int16 VCLXAccessibleEdit::getAccessibleRole( ) VclPtr< Edit > pEdit = GetAs< Edit >(); if ( pEdit && ( ( pEdit->GetStyle() & WB_PASSWORD ) || pEdit->GetEchoChar() ) ) nRole = AccessibleRole::PASSWORD_TEXT; + else if ( pEdit && ( pEdit->GetStyle() & WB_READONLY ) ) + nRole = AccessibleRole::LABEL; else nRole = AccessibleRole::TEXT; -- cgit