title: NSAttributedKey UIAccessibilitySpeechAttributeQueueAnnouncement
body: <p>I would liked to post a queued announcement</p>
  
  <p>I tried using <code>UIAccessibilitySpeechAttributeQueueAnnouncement</code> but I have trouble converting it into an <code>NSAttributedStringKey</code></p>
  
  <h1>Code:</h1>
  
  <pre><code>let queueAnnouncementKey = NSAttributedStringKey(rawValue: UIAccessibilitySpeechAttributeQueueAnnouncement)
  
  let announcementString = NSAttributedString(string: "something",
                                              attributes: [queueAnnouncementKey : NSNumber(booleanLiteral: true)])
  
  UIAccessibilityPostNotification(UIAccessibilityAnnouncementNotification, announcementString)
  </code></pre>
  
  <h1>Problem:</h1>
  
  <ul>
  <li>The announcement is not queued, if there is an on going announcement at that moment, it ignores my announcement</li>
  </ul>
  
  <h1>Possible Cause:</h1>
  
  <ul>
  <li><p>I think something the way I create <code>NSAttributedString</code> is wrong</p></li>
  <li><p>I think the <code>NSAttributedString</code> has changed from the time this presentation was made, so needed to use rawValue.</p></li>
  <li><p>May be it is because it is not the correct raw value and that is causing it not to work.</p></li>
  </ul>
  
  <h1>Refer:</h1>
  
  <p><a href="https://developer.apple.com/videos/play/wwdc2017-215/?time=1627" rel="nofollow noreferrer">https://developer.apple.com/videos/play/wwdc2017-215/?time=1627</a></p>
  
  <p><a href="https://devstreaming-cdn.apple.com/videos/wwdc/2017/215avg3cuo2bu/215/215_whats_new_in_accessibility.pdf?dl=1" rel="nofollow noreferrer">https://devstreaming-cdn.apple.com/videos/wwdc/2017/215avg3cuo2bu/215/215_whats_new_in_accessibility.pdf?dl=1</a></p>