--- old/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicHTML.java 2019-09-24 09:05:13.509172607 +0530 +++ new/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicHTML.java 2019-09-24 09:05:13.237172607 +0530 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,6 +28,7 @@ import java.awt.*; import java.net.URL; +import javax.accessibility.AccessibleContext; import javax.swing.*; import javax.swing.text.*; import javax.swing.text.html.*; @@ -223,6 +224,14 @@ } } c.putClientProperty(BasicHTML.propertyKey, value); + if (value != null) { + try { + c.putClientProperty(AccessibleContext.ACCESSIBLE_NAME_PROPERTY, + value.getDocument().getText(1, value.getDocument().getLength() - 1)); + } catch (BadLocationException e) { + e.printStackTrace(); + } + } } /**