AccessibilityNodeInfoCompat.PublicationInfoCompat


@PreviewAccessibilityApi
public final class AccessibilityNodeInfoCompat.PublicationInfoCompat extends AccessibilityNodeInfoCompat.StructuredDataInfoCompat


Holds information about a node that represents a part of a digital publication, such as a chapter, footnote, or glossary entry.

An accessibility service can use this information to provide a richer experience for users reading digital publications, such as ebooks, articles, and long-form documents. For example, a screen reader could announce when a user enters a chapter or footnote and allow jumping between publication sections.

To add publication information to a node, create an instance of PublicationInfoCompat and call setStructuredDataInfo.

On all API levels, this information is currently stored in the node's extras, where accessibility services can read it with getStructuredDataInfo. See StructuredDataInfoCompat.

Summary

Constants

static final String
PUBLICATION_TAG_ABSTRACT = "doc-abstract"

A short summary of the work, or of a section or excerpt of it.

static final String
PUBLICATION_TAG_ACKNOWLEDGMENTS = "doc-acknowledgments"

A section that acknowledges contributions to the work.

static final String
PUBLICATION_TAG_AFTERWORD = "doc-afterword"

A closing statement, typically about how the work came to be or what followed it.

static final String
PUBLICATION_TAG_APPENDIX = "doc-appendix"

Supplemental information placed after the main content.

static final String
PUBLICATION_TAG_BACK_LINK = "doc-backlink"

A link back to a related location, such as from a note to where it's referenced.

static final String
PUBLICATION_TAG_BIBLIOGRAPHY = "doc-bibliography"

A list of external sources cited in the work.

static final String

A reference to a bibliography entry.

static final String
PUBLICATION_TAG_CHAPTER = "doc-chapter"

A major thematic section of the work.

static final String
PUBLICATION_TAG_COLOPHON = "doc-colophon"

Production notes for the edition, such as the typeface used.

static final String
PUBLICATION_TAG_CONCLUSION = "doc-conclusion"

A section that summarizes the work or wraps up its narrative.

static final String
PUBLICATION_TAG_COVER = "doc-cover"

A cover image, typically showing the title and author.

static final String
PUBLICATION_TAG_CREDIT = "doc-credit"

An acknowledgment of the source of third-party content, such as a photo.

static final String
PUBLICATION_TAG_CREDITS = "doc-credits"

A collection of credits.

static final String
PUBLICATION_TAG_DEDICATION = "doc-dedication"

An inscription dedicating the work to one or more people.

static final String
PUBLICATION_TAG_ENDNOTES = "doc-endnotes"

A collection of notes at the end of the work or of a section.

static final String
PUBLICATION_TAG_EPIGRAPH = "doc-epigraph"

A quotation at the start of the work or a section that sets its theme or mood.

static final String
PUBLICATION_TAG_EPILOGUE = "doc-epilogue"

A concluding section of narrative that comments on the work's events, typically from a later time.

static final String
PUBLICATION_TAG_ERRATA = "doc-errata"

A list of corrections made after publication.

static final String
PUBLICATION_TAG_EXAMPLE = "doc-example"

An illustration of a key concept, such as a code listing or case study.

static final String
PUBLICATION_TAG_FOOTNOTE = "doc-footnote"

Ancillary information, such as a citation or comment, about a referenced passage.

static final String
PUBLICATION_TAG_FOREWORD = "doc-foreword"

An introductory section, typically written by someone other than the author.

static final String
PUBLICATION_TAG_GLOSSARY = "doc-glossary"

A list of terms used in the work, with their definitions.

static final String

A reference to a glossary definition.

static final String
PUBLICATION_TAG_INDEX = "doc-index"

A detailed list of links to the subjects, names and topics in the work.

static final String
PUBLICATION_TAG_INTRODUCTION = "doc-introduction"

A section that introduces the scope or nature of the work.

static final String

A reference to a footnote or endnote, typically a superscript number or symbol.

static final String
PUBLICATION_TAG_NOTICE = "doc-notice"

A warning about the consequences of an action or event.

static final String
PUBLICATION_TAG_PAGE_BREAK = "doc-pagebreak"

The point where one page of a paginated edition ends and the next begins.

static final String
PUBLICATION_TAG_PAGE_FOOTER = "doc-pagefooter"

Text at the bottom of a page that gives context about the work and the reader's place in it.

static final String
PUBLICATION_TAG_PAGE_HEADER = "doc-pageheader"

Text at the top of a page that gives context about the work and the reader's place in it.

static final String
PUBLICATION_TAG_PAGE_LIST = "doc-pagelist"

A list of links to the page breaks in the content.

static final String

A major division of the work that groups related sections, such as several chapters.

static final String
PUBLICATION_TAG_PREFACE = "doc-preface"

An introductory section, typically written by the author.

static final String
PUBLICATION_TAG_PROLOGUE = "doc-prologue"

An introductory section that sets the background, typically as part of the narrative.

static final String
PUBLICATION_TAG_PULL_QUOTE = "doc-pullquote"

A quotation from the content, set apart to draw attention to it.

static final String

Content structured as questions and answers, such as an interview or FAQ.

static final String
PUBLICATION_TAG_SUBTITLE = "doc-subtitle"

An explanatory or alternate title for the work or a section.

static final String

An ordered list of links to the major headings in the content.

static final String

Helpful information that clarifies the content.

Public constructors

Instantiates a new PublicationInfoCompat.

Public methods

@NonNull String

Inherited methods

From androidx.core.view.accessibility.AccessibilityNodeInfoCompat.StructuredDataInfoCompat
boolean
@Nullable String
getAttribute(@NonNull String attributeKey)

Gets the value of an attribute.

@NonNull Map<String, String>

Returns an unmodifiable map of attributes.

int
void
putAttribute(@NonNull String attributeKey, @NonNull String value)

Adds an attribute.

void

Removes an attribute.

@NonNull String

Constants

PUBLICATION_TAG_ABSTRACT

public static final String PUBLICATION_TAG_ABSTRACT = "doc-abstract"

A short summary of the work, or of a section or excerpt of it.

PUBLICATION_TAG_ACKNOWLEDGMENTS

public static final String PUBLICATION_TAG_ACKNOWLEDGMENTS = "doc-acknowledgments"

A section that acknowledges contributions to the work.

PUBLICATION_TAG_AFTERWORD

public static final String PUBLICATION_TAG_AFTERWORD = "doc-afterword"

A closing statement, typically about how the work came to be or what followed it.

PUBLICATION_TAG_APPENDIX

public static final String PUBLICATION_TAG_APPENDIX = "doc-appendix"

Supplemental information placed after the main content.

PUBLICATION_TAG_BACK_LINK

public static final String PUBLICATION_TAG_BACK_LINK = "doc-backlink"

A link back to a related location, such as from a note to where it's referenced.

PUBLICATION_TAG_BIBLIOGRAPHY

public static final String PUBLICATION_TAG_BIBLIOGRAPHY = "doc-bibliography"

A list of external sources cited in the work.

PUBLICATION_TAG_BIBLIOGRAPHY_REFERENCE

public static final String PUBLICATION_TAG_BIBLIOGRAPHY_REFERENCE = "doc-biblioref"

A reference to a bibliography entry.

PUBLICATION_TAG_CHAPTER

public static final String PUBLICATION_TAG_CHAPTER = "doc-chapter"

A major thematic section of the work.

PUBLICATION_TAG_COLOPHON

public static final String PUBLICATION_TAG_COLOPHON = "doc-colophon"

Production notes for the edition, such as the typeface used.

PUBLICATION_TAG_CONCLUSION

public static final String PUBLICATION_TAG_CONCLUSION = "doc-conclusion"

A section that summarizes the work or wraps up its narrative.

PUBLICATION_TAG_COVER

public static final String PUBLICATION_TAG_COVER = "doc-cover"

A cover image, typically showing the title and author.

PUBLICATION_TAG_CREDIT

public static final String PUBLICATION_TAG_CREDIT = "doc-credit"

An acknowledgment of the source of third-party content, such as a photo.

PUBLICATION_TAG_CREDITS

public static final String PUBLICATION_TAG_CREDITS = "doc-credits"

A collection of credits.

PUBLICATION_TAG_DEDICATION

public static final String PUBLICATION_TAG_DEDICATION = "doc-dedication"

An inscription dedicating the work to one or more people.

PUBLICATION_TAG_ENDNOTES

public static final String PUBLICATION_TAG_ENDNOTES = "doc-endnotes"

A collection of notes at the end of the work or of a section.

PUBLICATION_TAG_EPIGRAPH

public static final String PUBLICATION_TAG_EPIGRAPH = "doc-epigraph"

A quotation at the start of the work or a section that sets its theme or mood.

PUBLICATION_TAG_EPILOGUE

public static final String PUBLICATION_TAG_EPILOGUE = "doc-epilogue"

A concluding section of narrative that comments on the work's events, typically from a later time.

PUBLICATION_TAG_ERRATA

public static final String PUBLICATION_TAG_ERRATA = "doc-errata"

A list of corrections made after publication.

PUBLICATION_TAG_EXAMPLE

public static final String PUBLICATION_TAG_EXAMPLE = "doc-example"

An illustration of a key concept, such as a code listing or case study.

PUBLICATION_TAG_FOOTNOTE

public static final String PUBLICATION_TAG_FOOTNOTE = "doc-footnote"

Ancillary information, such as a citation or comment, about a referenced passage.

PUBLICATION_TAG_FOREWORD

public static final String PUBLICATION_TAG_FOREWORD = "doc-foreword"

An introductory section, typically written by someone other than the author.

PUBLICATION_TAG_GLOSSARY

public static final String PUBLICATION_TAG_GLOSSARY = "doc-glossary"

A list of terms used in the work, with their definitions.

PUBLICATION_TAG_GLOSSARY_REFERENCE

public static final String PUBLICATION_TAG_GLOSSARY_REFERENCE = "doc-glossref"

A reference to a glossary definition.

PUBLICATION_TAG_INDEX

public static final String PUBLICATION_TAG_INDEX = "doc-index"

A detailed list of links to the subjects, names and topics in the work.

PUBLICATION_TAG_INTRODUCTION

public static final String PUBLICATION_TAG_INTRODUCTION = "doc-introduction"

A section that introduces the scope or nature of the work.

PUBLICATION_TAG_NOTE_REFERENCE

public static final String PUBLICATION_TAG_NOTE_REFERENCE = "doc-noteref"

A reference to a footnote or endnote, typically a superscript number or symbol.

PUBLICATION_TAG_NOTICE

public static final String PUBLICATION_TAG_NOTICE = "doc-notice"

A warning about the consequences of an action or event.

PUBLICATION_TAG_PAGE_BREAK

public static final String PUBLICATION_TAG_PAGE_BREAK = "doc-pagebreak"

The point where one page of a paginated edition ends and the next begins. Its accessible name is normally the number of the page that follows.

PUBLICATION_TAG_PAGE_FOOTER

public static final String PUBLICATION_TAG_PAGE_FOOTER = "doc-pagefooter"

Text at the bottom of a page that gives context about the work and the reader's place in it.

PUBLICATION_TAG_PAGE_HEADER

public static final String PUBLICATION_TAG_PAGE_HEADER = "doc-pageheader"

Text at the top of a page that gives context about the work and the reader's place in it.

PUBLICATION_TAG_PAGE_LIST

public static final String PUBLICATION_TAG_PAGE_LIST = "doc-pagelist"

A list of links to the page breaks in the content.

PUBLICATION_TAG_PART

public static final String PUBLICATION_TAG_PART = "doc-part"

A major division of the work that groups related sections, such as several chapters.

PUBLICATION_TAG_PREFACE

public static final String PUBLICATION_TAG_PREFACE = "doc-preface"

An introductory section, typically written by the author.

PUBLICATION_TAG_PROLOGUE

public static final String PUBLICATION_TAG_PROLOGUE = "doc-prologue"

An introductory section that sets the background, typically as part of the narrative.

PUBLICATION_TAG_PULL_QUOTE

public static final String PUBLICATION_TAG_PULL_QUOTE = "doc-pullquote"

A quotation from the content, set apart to draw attention to it.

PUBLICATION_TAG_QUESTIONS_AND_ANSWERS

public static final String PUBLICATION_TAG_QUESTIONS_AND_ANSWERS = "doc-qna"

Content structured as questions and answers, such as an interview or FAQ.

PUBLICATION_TAG_SUBTITLE

public static final String PUBLICATION_TAG_SUBTITLE = "doc-subtitle"

An explanatory or alternate title for the work or a section.

PUBLICATION_TAG_TABLE_OF_CONTENTS

public static final String PUBLICATION_TAG_TABLE_OF_CONTENTS = "doc-toc"

An ordered list of links to the major headings in the content.

PUBLICATION_TAG_TIP

public static final String PUBLICATION_TAG_TIP = "doc-tip"

Helpful information that clarifies the content.

Public constructors

PublicationInfoCompat

public PublicationInfoCompat(@NonNull String tag)

Instantiates a new PublicationInfoCompat.

Parameters
@NonNull String tag

The publication tag for this node.

Throws
java.lang.IllegalArgumentException

if tag is empty.

Public methods

getTag

public @NonNull String getTag()